aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-04-08 14:02:52 +0100
committerStephen Blott2016-04-08 14:02:54 +0100
commit7ea8e0a5e829a282dfc4f21595d76146fd6b5334 (patch)
tree43fa3668e4dca3d8030fef5057996d287c4dc498
parent047befd24c2cbb1ab35158cc480653591843efc0 (diff)
downloadvimium-7ea8e0a5e829a282dfc4f21595d76146fd6b5334.tar.bz2
Filtered hints; do not accept split characters.
There is no point accepting characters which are used for splitting the link text in the query string, since such characters cannot appear in link text words.
-rw-r--r--content_scripts/link_hints.coffee3
1 files changed, 2 insertions, 1 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index 13f28f06..3cbda59f 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -464,7 +464,8 @@ class FilterHints
# hints).
if 0 <= @linkHintNumbers.indexOf keyChar
@hintKeystrokeQueue.push keyChar
- else
+ # We only accept <Space> and characters which are not used for splitting (e.g. "a", "b", etc., but not "-").
+ else if keyChar == " " or not @splitRegexp.test keyChar
# Since we might renumber the hints, we should reset the current hintKeyStrokeQueue.
@hintKeystrokeQueue = []
@linkTextKeystrokeQueue.push keyChar