mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 06:17:58 +01:00
Last commit again, only right
This commit is contained in:
@@ -132,17 +132,15 @@ CompletionContext.prototype = {
|
||||
});
|
||||
|
||||
let substrings = lists.reduce(
|
||||
function (res, str) res.filter(
|
||||
function (s) s.substr(0, Math.min(s.length, str.length))),
|
||||
function (res, list) res.filter(
|
||||
function (str) list.some(function (s) s.substr(0, str.length) == str)),
|
||||
lists.pop());
|
||||
return util.Array.uniq(substrings);
|
||||
},
|
||||
// Temporary
|
||||
get longestAllSubstring()
|
||||
{
|
||||
let substrings = this.allSubstrings;
|
||||
// Find the longest match
|
||||
return substrings.reduce(function (a, b) a.length > b.length ? a : b, "");
|
||||
return this.allSubstrings.reduce(function (a, b) a.length > b.length ? a : b, "");
|
||||
},
|
||||
|
||||
get caret() this._caret - this.offset,
|
||||
|
||||
Reference in New Issue
Block a user