diff options
author | hogelog | 2008-12-21 05:25:14 +0000 |
---|---|---|
committer | hogelog | 2008-12-21 05:25:14 +0000 |
commit | 468f5e8482578b87407fe222465cae7f79ede0be (patch) | |
tree | c9882edc7427c32510ea2f631c260ad402ead705 /char-hints-mod2.js | |
parent | d7cc4605f335fe047e6c9409f591ef9c1e1f3fab (diff) | |
download | vimperator-plugins-468f5e8482578b87407fe222465cae7f79ede0be.tar.bz2 |
* fix: process hint if only one valid hint.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@27140 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'char-hints-mod2.js')
-rw-r--r-- | char-hints-mod2.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/char-hints-mod2.js b/char-hints-mod2.js index 0d285b2..9d1ee5c 100644 --- a/char-hints-mod2.js +++ b/char-hints-mod2.js @@ -147,6 +147,7 @@ set charhintshow=uppercase|lowercase: } //}}}
function isValidHint(hint) //{{{
{
+ if(hintInput.length == 0 ) return false;
return inputCase(hint).indexOf(hintInput) == 0;
} //}}}
@@ -168,12 +169,12 @@ set charhintshow=uppercase|lowercase: let hintString = commandline.command;
commandline.command = hintString.replace(inputRegex, "");
charhints.original.onInput(event);
- showCharHints();
for(let i=0,l=hintString.length;i<l;++i) {
if(inputRegex.test(hintString[i])) {
hintInput += hintString[i];
}
}
+ showCharHints();
if(hintInput.length>0) {
let numstr = String(chars2num(hintInput));
// no setTimeout, don't run nice
|