Use titles of url history to filter completion list.
authorDaniel Carl <danielcarl@gmx.de>
Fri, 26 Jul 2013 18:40:10 +0000 (20:40 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Fri, 26 Jul 2013 18:40:10 +0000 (20:40 +0200)
doc/vimb.1.txt
src/history.c

index e41cd30..f22404e 100644 (file)
@@ -400,8 +400,8 @@ prefix.
 .TP
 .B history
 The history of URLs is shown for the `:open ` and `:tabopen ` commands. This
-completion looks up for every given word in the list of the url history. Only
-those completion are shown that match every given word.
+completion looks up for every given word in the history url and titles. Only
+those history items are shown, where the title or url contains all tags.
 
 Example:
 ":open foo bar<tab>" will complete only URLs that contain the words foo and
index 6c5f7b3..a099381 100644 (file)
@@ -348,7 +348,9 @@ static gboolean history_item_contains_all_tags(History *item, char **query,
 
     /* iterate over all query parts */
     for (i = 0; i < qlen; i++) {
-        if (!util_strcasestr(item->first, query[i])) {
+        if (!(util_strcasestr(item->first, query[i])
+            || (item->second && util_strcasestr(item->second, query[i])))
+        ) {
             return false;
         }
     }