hinting: leave hint mode if no hints

This commit is contained in:
Colin Caine 2017-11-23 01:10:45 +00:00
parent 616255c8ea
commit d1784c994d

View file

@ -51,10 +51,15 @@ export function hintPage(
modeState.hintchars += name
modeState.hints.push(new Hint(el, name, onSelect))
}
console.log("HINTS", modeState.hints)
modeState.focusedHint = modeState.hints[0]
modeState.focusedHint.focused = true
document.body.appendChild(modeState.hintHost)
if (modeState.hints.length) {
console.log("HINTS", modeState.hints)
modeState.focusedHint = modeState.hints[0]
modeState.focusedHint.focused = true
document.body.appendChild(modeState.hintHost)
} else {
reset()
}
}
/** vimperator-style minimal hint names */