mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-23 09:55:47 +01:00
Replace expression closures (function expressions - named and dynamic this).
Expression closures are to be axed. See https://bugzil.la/1083458. Leaving deprecated() and literal() calls and method shorthand syntax conversions until after the ESR overlap.
This commit is contained in:
@@ -837,7 +837,9 @@ unlet s:cpo_save
|
||||
sep = sep || " ";
|
||||
let width = 0;
|
||||
let lines = [];
|
||||
lines.__defineGetter__("last", function () this[this.length - 1]);
|
||||
lines.__defineGetter__("last", function () {
|
||||
return this[this.length - 1];
|
||||
});
|
||||
|
||||
for (let item of values(items.array || items)) {
|
||||
if (item.length > width && (!lines.length || lines.last.length > 1)) {
|
||||
@@ -1056,7 +1058,9 @@ unlet s:cpo_save
|
||||
dir = dir.replace("/+$", "") + "/";
|
||||
completion.file(context, true, dir + context.filter);
|
||||
context.title[0] = dir;
|
||||
context.keys.text = function (f) this.path.substr(dir.length);
|
||||
context.keys.text = function (f) {
|
||||
return this.path.substr(dir.length);
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user