diff options
author | Micha Gorelick <mynameisfiber@gmail.com> | 2015-03-08 13:05:22 -0400 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2015-03-08 21:28:28 +0100 |
commit | 45388cdf221c54fb797aa8ef9a3db1712523dcac (patch) | |
tree | 70ae9d54f2726a010e7c848f01ec5d89df8f217d /src/hints.js | |
parent | 3b0f045d0af1eb96e5fea747cea3e7a0251e3091 (diff) |
Added hint-follow-last option
Diffstat (limited to 'src/hints.js')
-rw-r--r-- | src/hints.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/hints.js b/src/hints.js index c2a0fe8..c7db2ec 100644 --- a/src/hints.js +++ b/src/hints.js @@ -278,7 +278,7 @@ Object.freeze((function(){ } } } - if (fireLast && validHints.length <= 1) { + if (fireLast && config.followLast && validHints.length <= 1) { focusHint(0); return fire(); } @@ -544,7 +544,7 @@ Object.freeze((function(){ /* the api */ return { - init: function init(mode, keepOpen, maxHints, hintKeys) { + init: function init(mode, keepOpen, maxHints, hintKeys, followLast) { var prop, /* holds the xpaths for the different modes */ xpathmap = { @@ -568,7 +568,8 @@ Object.freeze((function(){ /* don't handle form for Y to allow to yank form filed content */ /* instead of switching to input mode */ handleForm: ("eot".indexOf(mode) >= 0), - hintKeys: hintKeys + hintKeys: hintKeys, + followLast: followLast, }; for (prop in xpathmap) { if (prop.indexOf(mode) >= 0) { |