1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 10:17:59 +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

@@ -635,10 +635,8 @@ var Commands = Module("commands", {
* command string.
*/
execute: function (string, tokens, silent, args, context) {
contexts.withSavedValues(["context"], function () {
context = update({}, context || this.context || { file: "[Command Line]", line: 1 });
this.context = context;
contexts.withContext(context || this.context || { file: "[Command Line]", line: 1 },
function (context) {
io.withSavedValues(["readHeredoc"], function () {
this.readHeredoc = function (end) {
let res = [];