aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CREDITS1
-rw-r--r--README.md2
-rw-r--r--background_scripts/completion.coffee2
-rw-r--r--tests/unit_tests/completion_test.coffee6
4 files changed, 8 insertions, 3 deletions
diff --git a/CREDITS b/CREDITS
index 60a5acaa..539b998c 100644
--- a/CREDITS
+++ b/CREDITS
@@ -42,5 +42,6 @@ Contributors:
Werner Laurensse (github: ab3)
Timo Sand <timo.j.sand@gmail.com> (github: deiga)
Shiyong Chen <billbill290@gmail.com> (github: UncleBill)
+ Utkarsh Upadhyay <musically.ut@gmail.com) (github: musically-ut)
Feel free to add real names in addition to GitHub usernames.
diff --git a/README.md b/README.md
index 36d176e6..96cde9bb 100644
--- a/README.md
+++ b/README.md
@@ -174,7 +174,7 @@ Release Notes
- Added `gU`, which goes to the root of the current URL.
- Added `yt`, which duplicates the current tab.
- Added `W`, which moves the current tab to a new window.
-- Added marks for saving and jumping to sections of a page. `mX` to set a mark and `X` to return to it.
+- Added marks for saving and jumping to sections of a page. `mX` to set a mark and `` `X`` to return to it.
- Added "LinkHints.activateModeToOpenIncognito", currently an advanced, unbound command.
- Disallowed repeat tab closings, since this causes trouble for many people.
- Update our Chrome APIs so Vimium works on Chrome 28+.
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index d9c7ef8b..6a1c0d30 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -204,7 +204,7 @@ class DomainCompleter
domains: null
filter: (queryTerms, onComplete) ->
- return onComplete([]) if queryTerms.length > 1
+ return onComplete([]) unless queryTerms.length == 1
if @domains
@performSearch(queryTerms, onComplete)
else
diff --git a/tests/unit_tests/completion_test.coffee b/tests/unit_tests/completion_test.coffee
index 685758c5..56fcc456 100644
--- a/tests/unit_tests/completion_test.coffee
+++ b/tests/unit_tests/completion_test.coffee
@@ -152,8 +152,9 @@ context "domain completer",
setup ->
@history1 = { title: "history1", url: "http://history1.com", lastVisitTime: hours(1) }
@history2 = { title: "history2", url: "http://history2.com", lastVisitTime: hours(1) }
+ @undef = { title: "history2", url: "http://undefined.net", lastVisitTime: hours(1) }
- stub(HistoryCache, "use", (onComplete) => onComplete([@history1, @history2]))
+ stub(HistoryCache, "use", (onComplete) => onComplete([@history1, @history2, @undef]))
global.chrome.history =
onVisited: { addListener: -> }
onVisitRemoved: { addListener: -> }
@@ -174,6 +175,9 @@ context "domain completer",
should "returns no results when there's more than one query term, because clearly it's not a domain", ->
assert.arrayEqual [], filterCompleter(@completer, ["his", "tory"])
+ should "not return any results for empty queries", ->
+ assert.arrayEqual [], filterCompleter(@completer, [])
+
context "domain completer (removing entries)",
setup ->
@history1 = { title: "history1", url: "http://history1.com", lastVisitTime: hours(2) }