mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
moved Vimperator hint char generation out of loop
This commit is contained in:
parent
83d11d4846
commit
2820c94a50
|
|
@ -893,10 +893,12 @@ function buildHintsVimperator(
|
|||
) {
|
||||
const hintablesfiltered = hintablesArray.map(h => ({ elements: h.elements.filter(el => Hint.isHintable(el)), hintclasses: h.hintclasses }))
|
||||
const totalhints = hintablesfiltered.reduce((n, h) => n + h.elements.length, 0)
|
||||
const allnames = Array.from(
|
||||
hintnames(totalhints + modeState.hints.length),
|
||||
).slice(modeState.hints.length)
|
||||
|
||||
for (const hintables of hintablesfiltered) {
|
||||
const names = Array.from(
|
||||
hintnames(totalhints + modeState.hints.length),
|
||||
).slice(modeState.hints.length)
|
||||
const names = allnames.slice(modeState.hints.length)
|
||||
for (const [el, name] of izip(hintables.elements, names)) {
|
||||
let ft = elementFilterableText(el)
|
||||
ft = vimpHelper.sanitiseHintText(ft)
|
||||
|
|
|
|||
Loading…
Reference in a new issue