Sort bookmark completion.
authorDaniel Carl <danielcarl@gmx.de>
Fri, 12 Jul 2013 22:38:23 +0000 (00:38 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Fri, 12 Jul 2013 22:38:23 +0000 (00:38 +0200)
For the bookmarks the sorting by the occurrence in bookmark file makes no
sense and is sometimes irritating.

src/completion.c

index 99321ef..db518da 100644 (file)
@@ -83,7 +83,7 @@ gboolean completion_complete(gboolean back)
     } else if (type == VB_INPUT_OPEN || type == VB_INPUT_TABOPEN) {
         /* if search string begins with TAG_INDICATOR lookup the bookmarks */
         if (suffix && *suffix == TAG_INDICATOR) {
-            source = bookmark_get_by_tags(suffix + 1);
+            source = g_list_sort(bookmark_get_by_tags(suffix + 1), (GCompareFunc)g_strcmp0);
         } else {
             source = history_get_by_tags(HISTORY_URL, suffix);
         }