mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 06:17:58 +01:00
Replace expression closures (function declarations).
Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
@@ -299,7 +299,9 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
|
||||
// Find the *count*th occurance of *char* before a non-collapsed
|
||||
// \n, ignoring the character at the caret.
|
||||
let i = 0;
|
||||
function test(c) (collapse || c != "\n") && !!(!i++ || c != char || --count)
|
||||
function test(c) {
|
||||
return (collapse || c != "\n") && !!(!i++ || c != char || --count);
|
||||
}
|
||||
|
||||
Editor.extendRange(range, !backward, { test: test }, true);
|
||||
dactyl.assert(count == 0);
|
||||
|
||||
Reference in New Issue
Block a user