projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1503e8e
)
Stop hinting if no element is found.
author
Daniel Carl
<danielcarl@gmx.de>
Fri, 1 Mar 2013 16:18:22 +0000
(17:18 +0100)
committer
Daniel Carl
<danielcarl@gmx.de>
Fri, 1 Mar 2013 16:18:22 +0000
(17:18 +0100)
src/hints.js
patch
|
blob
|
history
diff --git
a/src/hints.js
b/src/hints.js
index
23e47be
..
2f777f2
100644
(file)
--- a/
src/hints.js
+++ b/
src/hints.js
@@
-121,11
+121,10
@@
VimpHints = function Hints(bg, bgf, fg, style) {
_helper(topwin, 0, 0);
- _focus(1);
- if (hintCount == 1) {
- /* just one hinted element - might as well follow it */
+ if (hintCount <= 1) {
return this.fire(1);
}
+ _focus(1);
};
/* set focus to next avaiable hint */
@@
-202,7
+201,7
@@
VimpHints = function Hints(bg, bgf, fg, style) {
n = n ? n : curFocusNum;
var result = "DONE:";
var hint = _getHintByNumber(n);
- if (typeof(hint.elem) == "undefined") {
+ if (
!hint ||
typeof(hint.elem) == "undefined") {
return result;
}