mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-20 08:55:47 +01:00
Prevent infinite loops when trying to execute mappings recursively.
This commit is contained in:
@@ -110,7 +110,11 @@ var Map = Class("Map", {
|
||||
if (this.names[0] != ".") // FIXME: Kludge.
|
||||
mappings.repeat = repeat;
|
||||
|
||||
return dactyl.trapErrors(repeat);
|
||||
dactyl.assert(!this.executing, "Attempt to execute mapping recursively");
|
||||
this.executing = true;
|
||||
let res = dactyl.trapErrors(repeat);
|
||||
this.executing = false;
|
||||
return res;
|
||||
}
|
||||
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user