diff --git a/AUTHORS b/AUTHORS index 7e833f20..8af8b884 100644 --- a/AUTHORS +++ b/AUTHORS @@ -13,6 +13,7 @@ Inactive/former developers: * Marco Candrian (mac@calmar.ws) Patches (in no special order): + * Ruud Grosmann ('followhints' option) * Xie&Tian (multibyte support for hints) * Juergen Descher * Kazuo (count support for ctrl-^) diff --git a/NEWS b/NEWS index 278b3782..166025fa 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ * IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and VimperatorLeave respectively + * new 'followhints' option * :buffers supports a filter now to only list buffers matching filter (vim incompatible, but consistent with other commands) * Favicon support in many places diff --git a/content/bookmarks.js b/content/bookmarks.js index ecc85207..e1f753d9 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -686,7 +686,7 @@ function History() //{{{ function (args, special) { history.list(args.string, special); }, { bang: true, - completer: function (filter) completion.history(filter) + // completer: function (filter) completion.history(filter) }); /////////////////////////////////////////////////////////////////////////////}}} diff --git a/content/completion.js b/content/completion.js index 189c8e68..8d15cbde 100644 --- a/content/completion.js +++ b/content/completion.js @@ -1035,8 +1035,6 @@ function Completion() //{{{ highlightGroup: function highlightGroup(filter) commands.get("highlight").completer(filter), // XXX - history: function _history(filter) [0, history.get(filter)], - get javascriptCompleter() javascript, javascript: function _javascript(str) diff --git a/content/hints.js b/content/hints.js index 7877d442..cd6225f5 100644 --- a/content/hints.js +++ b/content/hints.js @@ -323,6 +323,17 @@ function Hints() //{{{ return false; } + if (options["followhints"] > 0) + { + if (!followFirst) + return false; // no return hit; don't examine uniqueness + + // OK. return hit. But there's more than one hint. And + // there's no tab-selected current link. Do not follow in mode 2 + if ((options["followhints"] == 2) && validHints.length > 1 && !hintNumber) + return liberator.beep(); + } + if (!followFirst) { var firstHref = validHints[0].getAttribute("href") || null; @@ -544,6 +555,11 @@ function Hints() //{{{ "number", 0, { validator: function (value) value >= 0 }); + options.add(["followhints", "fh"], + "Change the way when to automatically follow hints", + "number", 0, + { validator: function (value) value >= 0 && value < 3 }); + options.add(["linkfgcolor", "lfc"], "Foreground color of a link during hint mode", "string", "black"); diff --git a/locale/en-US/options.txt b/locale/en-US/options.txt index 98340df0..d29ccec7 100644 --- a/locale/en-US/options.txt +++ b/locale/en-US/options.txt @@ -357,6 +357,21 @@ Change the hint matching algorithm during hint mode. Possible values: ____ +|\'fh'| |\'followhints'| +||'followhints' 'fh'|| number (default: 0) +____ + +Change the function of hitting [m][m] in hint mode. Possible values: + +`---------`---------------------------------------------------------------------------------------------------------------------------------------------------------- +*0* Default behavior. Link is followed as soon as text uniquely identifies it. Pressing [m][m] follows the tab selected hint (if any) or the first link. +*1* Like 0, but don't follow link automatically if text has uniquely identified it. +*2* Like 1, but don't follow first link if there are more than 1 possibilities. +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +____ + + |\'ht'| |\'hinttags'| ||'hinttags' 'ht'|| string ____