mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 14:18:00 +01:00
use build_longest_common_substring rather than build_longest_starting_substring
for :sidebar completion
This commit is contained in:
@@ -467,9 +467,16 @@ vimperator.completion = (function() // {{{
|
|||||||
var nodes = [];
|
var nodes = [];
|
||||||
|
|
||||||
for (var i = 0; i < menu.childNodes.length; i++)
|
for (var i = 0; i < menu.childNodes.length; i++)
|
||||||
nodes.push([[menu.childNodes[i].label], ""]);
|
nodes.push([menu.childNodes[i].label, ""]);
|
||||||
|
|
||||||
return build_longest_starting_substring(nodes, filter);
|
if (!filter)
|
||||||
|
return nodes;
|
||||||
|
|
||||||
|
var mapped = nodes.map(function($_) {
|
||||||
|
return [[$_[0]], $_[1]];
|
||||||
|
});
|
||||||
|
|
||||||
|
return build_longest_common_substring(mapped, filter);
|
||||||
}, //}}}
|
}, //}}}
|
||||||
|
|
||||||
exTabCompletion: function(str) //{{{
|
exTabCompletion: function(str) //{{{
|
||||||
|
|||||||
Reference in New Issue
Block a user