From: Daniel Carl <danielcarl@gmx.de>
Date: Thu, 1 Aug 2013 16:52:10 +0000 (+0200)
Subject: Changed sort order in bookmark completion.
X-Git-Url: https://git.owens.tech/projects.html/projects.html/git?a=commitdiff_plain;h=6ec433fe04b3c61a6c9954143bd349944380d760;p=vimb.git

Changed sort order in bookmark completion.

Now the latest added items of the bookmarks file are shown first, so it's
similar to the history completion.
---

diff --git a/src/bookmark.c b/src/bookmark.c
index dc85139..fdb3992 100644
--- a/src/bookmark.c
+++ b/src/bookmark.c
@@ -106,6 +106,7 @@ gboolean bookmark_fill_completion(GtkListStore *store, const char *input)
     Bookmark *bm;
 
     src = load(vb.files[FILES_BOOKMARK]);
+    src = g_list_reverse(src);
     if (!input || *input == '\0') {
         /* without any tags return all bookmarked items */
         for (GList *l = src; l; l = l->next) {
diff --git a/src/completion.c b/src/completion.c
index 9f54f57..f4d98ee 100644
--- a/src/completion.c
+++ b/src/completion.c
@@ -82,7 +82,7 @@ gboolean completion_complete(gboolean back)
         if (suffix && *suffix == TAG_INDICATOR) {
             res = bookmark_fill_completion(store, suffix + 1);
         } else {
-            res  = history_fill_completion(store, HISTORY_URL, suffix);
+            res = history_fill_completion(store, HISTORY_URL, suffix);
         }
         sort = false;
     } else if (type == VB_INPUT_COMMAND) {