1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 02:38:00 +01:00

Add contexts.withContext.

--HG--
branch : groups
This commit is contained in:
Kris Maglione
2011-02-07 23:51:29 -05:00
parent 76dee44cb9
commit 51a9fc8dea
5 changed files with 14 additions and 13 deletions

View File

@@ -424,10 +424,10 @@ var CommandExMode = Class("CommandExMode", CommandMode, {
},
onSubmit: function onSubmit(command) {
io.withSavedValues(["readHeredoc"], function () {
this.readHeredoc = commandline.readHeredoc;
contexts.withSavedValues(["context"], function () {
this.context = { file: "[Command Line]", line: 1 };
contexts.withContext({ file: "[Command Line]", line: 1 },
function () {
io.withSavedValues(["readHeredoc"], function () {
this.readHeredoc = commandline.readHeredoc;
commands.repeat = command;
dactyl.execute(command);
});