about summary refs log tree commit diff stats
path: root/src/ui/window_list.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-05-29 11:26:18 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-05-29 11:26:18 +0200
commitbfaf737efad0766e62e8c9100a7c96ca97346e51 (patch)
treea39e3277a5805dbe848b92ab8d714b9d4dc2d364 /src/ui/window_list.c
parente19bf0e30321981ca46ff3370f479679ebc7e240 (diff)
downloadprofani-tty-bfaf737efad0766e62e8c9100a7c96ca97346e51.tar.gz
urlopen: get last URL first
Fix https://github.com/profanity-im/profanity/issues/1348
Diffstat (limited to 'src/ui/window_list.c')
-rw-r--r--src/ui/window_list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/window_list.c b/src/ui/window_list.c
index e506a957..01b5177f 100644
--- a/src/ui/window_list.c
+++ b/src/ui/window_list.c
@@ -1163,9 +1163,9 @@ wins_add_urls_ac(const ProfWin *const win, const ProfMessage *const message)
     {
         gchar *word = g_match_info_fetch (match_info, 0);
 
-        autocomplete_add(win->urls_ac, word);
+        autocomplete_add_reverse(win->urls_ac, word);
         // for people who run profanity a long time, we don't want to waste a lot of memory
-        autocomplete_remove_older_than_max(win->urls_ac, 20);
+        autocomplete_remove_older_than_max_reverse(win->urls_ac, 20);
 
         g_free (word);
         g_match_info_next (match_info, NULL);