mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-03 17:44:10 +01:00
Minor substring completion changes.
This commit is contained in:
@@ -553,11 +553,11 @@ var CompletionContext = Class("CompletionContext", {
|
||||
// of the given string which also matches the current
|
||||
// item's text.
|
||||
let len = substring.length;
|
||||
let i = 0, n = len;
|
||||
let result = item.result;
|
||||
let i = 0, n = len + 1;
|
||||
let result = n && fixCase(item.result);
|
||||
while (n) {
|
||||
let m = Math.floor(n / 2);
|
||||
let keep = i + m && compare(fixCase(result), substring.substring(0, i + m));
|
||||
let keep = compare(result, substring.substring(0, i + m));
|
||||
if (!keep)
|
||||
len = i + m - 1;
|
||||
if (!keep || m == 0)
|
||||
|
||||
Reference in New Issue
Block a user