diff --git a/common/content/commands.js b/common/content/commands.js index bd37d271..91c0bf86 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -428,7 +428,7 @@ const Commands = Module("commands", { io.withSavedValues(["readHeredoc", "sourcing"], function () { this.sourcing = update({}, sourcing); - args = update({ setFrom: this.file }, args || {}); + args = update({ setFrom: this.sourcing.file }, args || {}); if (tokens) string = commands.replaceTokens(string, tokens); diff --git a/common/content/dactyl.js b/common/content/dactyl.js index b8e522e9..07fffbad 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -318,7 +318,7 @@ const Dactyl = Module("dactyl", { * @param {boolean} silent Whether the command should be echoed on the * command line. */ - execute: function (str, modifiers, silent, sourcing) { + execute: function (str, modifiers, silent) { // skip comments and blank lines if (/^\s*("|$)/.test(str)) return; @@ -332,10 +332,7 @@ const Dactyl = Module("dactyl", { if (!silent) commandline.command = str.replace(/^\s*:\s*/, ""); - io.withSavedValues(["sourcing"], function () { - io.sourcing = sourcing || io.sourcing; - command.execute(args, modifiers); - }); + command.execute(args, modifiers); } }, diff --git a/common/content/options.js b/common/content/options.js index 261a7647..20d94e52 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -1171,7 +1171,7 @@ const Options = Module("options", { msg = " " + option.name + "=" + opt.optionValue; if (options["verbose"] > 0 && option.setFrom) - msg += "\n Last set from " + option.setFrom.path; + msg += "\n Last set from " + option.setFrom; dactyl.echo({msg}); }