aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/completion.coffee
diff options
context:
space:
mode:
authorStephen Blott2014-05-18 12:48:55 +0100
committerStephen Blott2014-05-18 12:48:55 +0100
commita1467b3f0ff2f7e3703edb032909980454763f1b (patch)
tree51fa790eddc4d0d586cba6a74fe05efda7bea9bc /background_scripts/completion.coffee
parent5d1b563de8f504c4175f4c203534955b97496281 (diff)
downloadvimium-a1467b3f0ff2f7e3703edb032909980454763f1b.tar.bz2
Require bookmark folder separator to be first character of a query term.
Diffstat (limited to 'background_scripts/completion.coffee')
-rw-r--r--background_scripts/completion.coffee4
1 files changed, 2 insertions, 2 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index fb3356da..54b94eb5 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -114,9 +114,9 @@ class BookmarkCompleter
onBookmarksLoaded: -> @performSearch() if @currentSearch
performSearch: ->
- # If the folder separator character is in the query, then we'll use the bookmark's full path as its title.
+ # If the folder separator character the first character in any query term, then we'll use the bookmark's full path as its title.
# Otherwise, we'll just use the its regular title.
- usePathAndTitle = @currentSearch.queryTerms.reduce ((prev,term) => prev || term.indexOf(@folderSeparator) != -1), false
+ usePathAndTitle = @currentSearch.queryTerms.reduce ((prev,term) => prev || term.indexOf(@folderSeparator) == 0), false
results =
if @currentSearch.queryTerms.length > 0
@bookmarks.filter (bookmark) =>