1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 07:58:00 +01:00

Fix :noremap

This commit is contained in:
Kris Maglione
2008-10-16 17:05:44 +00:00
parent bb32ae917c
commit a40b6892fe
2 changed files with 6 additions and 4 deletions

View File

@@ -762,10 +762,11 @@ lookup:
// no need (actually forbidden) to add: js <<EOF ... EOF around those files // no need (actually forbidden) to add: js <<EOF ... EOF around those files
source: function (filename, silent) source: function (filename, silent)
{ {
var wasSourcing = ioManager.sourcing;
try try
{ {
var file = ioManager.getFile(filename); var file = ioManager.getFile(filename);
this.sourcing = { ioManager.sourcing = {
file: file.path, file: file.path,
line: 0 line: 0
}; };
@@ -832,7 +833,7 @@ lookup:
} }
else else
{ {
this.sourcing.line = i + 1; ioManager.sourcing.line = i + 1;
// skip line comments and blank lines // skip line comments and blank lines
if (/^\s*(".*)?$/.test(line)) if (/^\s*(".*)?$/.test(line))
continue; continue;
@@ -908,7 +909,7 @@ lookup:
} }
finally finally
{ {
this.sourcing = null; ioManager.sourcing = wasSourcing;
} }
} }
}; //}}} }; //}}}

View File

@@ -218,7 +218,8 @@ function Mappings() //{{{
commands.add([ch + "no[remap]"], commands.add([ch + "no[remap]"],
"Map a key sequence without remapping keys" + modeDescription, "Map a key sequence without remapping keys" + modeDescription,
function (args) { map(args, modes, true); }); function (args) { map(args, modes, true); },
opts);
commands.add([ch + "mapc[lear]"], commands.add([ch + "mapc[lear]"],
"Remove all mappings" + modeDescription, "Remove all mappings" + modeDescription,