mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-02 23:04:13 +01:00
Fix substring computation issue.
--HG-- extra : rebase_source : b08420e6071d7a574503bc5671e09230a4c9c08a
This commit is contained in:
@@ -554,9 +554,10 @@ var CompletionContext = Class("CompletionContext", {
|
||||
// item's text.
|
||||
let len = substring.length;
|
||||
let i = 0, n = len;
|
||||
let result = item.result;
|
||||
while (n) {
|
||||
let m = Math.floor(n / 2);
|
||||
let keep = compare(fixCase(item.text), substring.substring(0, i + m));
|
||||
let keep = i + m && compare(fixCase(result), substring.substring(0, i + m));
|
||||
if (!keep)
|
||||
len = i + m - 1;
|
||||
if (!keep || m == 0)
|
||||
|
||||
Reference in New Issue
Block a user