diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-10-15 20:31:20 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-10-15 20:31:20 -0400 |
commit | e38b8568290dc965b637f937fcafa42b6e725a23 (patch) | |
tree | 2094d95bbafb9079c0dfbcdcab21cfd5e8f9b560 | |
parent | b940a9db96bd953538f182c9ec82ce907945eafd (diff) | |
download | pentadactyl-e38b8568290dc965b637f937fcafa42b6e725a23.tar.gz |
Fix double command output for things like :ls|ls
-rw-r--r-- | common/content/buffer.js | 5 | ||||
-rw-r--r-- | common/content/commandline.js | 5 | ||||
-rw-r--r-- | common/content/dactyl.js | 5 |
3 files changed, 7 insertions, 8 deletions
diff --git a/common/content/buffer.js b/common/content/buffer.js index 0913c4e9..5e3ff856 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -359,10 +359,7 @@ const Buffer = Module("buffer", { * @property {string} The current top-level document's URL, sans any * fragment identifier. */ - get URI() { - let loc = window.content.location; - return loc.href.substr(0, loc.href.length - loc.hash.length); - }, + get URI() window.content.document.documentURI, /** * @property {number} The buffer's height in pixels. diff --git a/common/content/commandline.js b/common/content/commandline.js index fd9f9e74..67f85d01 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -519,7 +519,10 @@ const CommandLine = Module("commandline", { commandOutput: function (xml) { XML.ignoreWhitespace = false; XML.prettyPrinting = false; - this.echo(<>:{this.command}<br/>{xml}</>, this.HIGHLIGHT_NORMAL, this.FORCE_MULTILINE); + if (this.command) + this.echo(<>:{this.command}</>, this.HIGHLIGHT_NORMAL, this.FORCE_MULTILINE); + this.echo(xml, this.HIGHLIGHT_NORMAL, this.FORCE_MULTILINE); + this.command = null; }, /** diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 86a1b1c2..b7880e54 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -328,13 +328,12 @@ const Dactyl = Module("dactyl", { modifiers = modifiers || {}; + if (!silent) + commandline.command = str.replace(/^\s*:\s*/, ""); for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) { if (command === null) throw FailedAssertion("E492: Not a " + config.appName + " command: " + args.commandString); - if (!silent) - commandline.command = str.replace(/^\s*:\s*/, ""); - command.execute(args, modifiers); } }, |