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

Fix double command output for things like :ls|ls

This commit is contained in:
Kris Maglione
2010-10-15 20:31:20 -04:00
parent b940a9db96
commit e38b856829
3 changed files with 7 additions and 8 deletions

View File

@@ -359,10 +359,7 @@ const Buffer = Module("buffer", {
* @property {string} The current top-level document's URL, sans any * @property {string} The current top-level document's URL, sans any
* fragment identifier. * fragment identifier.
*/ */
get URI() { get URI() window.content.document.documentURI,
let loc = window.content.location;
return loc.href.substr(0, loc.href.length - loc.hash.length);
},
/** /**
* @property {number} The buffer's height in pixels. * @property {number} The buffer's height in pixels.

View File

@@ -519,7 +519,10 @@ const CommandLine = Module("commandline", {
commandOutput: function (xml) { commandOutput: function (xml) {
XML.ignoreWhitespace = false; XML.ignoreWhitespace = false;
XML.prettyPrinting = 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;
}, },
/** /**

View File

@@ -328,13 +328,12 @@ const Dactyl = Module("dactyl", {
modifiers = modifiers || {}; modifiers = modifiers || {};
if (!silent)
commandline.command = str.replace(/^\s*:\s*/, "");
for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) { for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) {
if (command === null) if (command === null)
throw FailedAssertion("E492: Not a " + config.appName + " command: " + args.commandString); throw FailedAssertion("E492: Not a " + config.appName + " command: " + args.commandString);
if (!silent)
commandline.command = str.replace(/^\s*:\s*/, "");
command.execute(args, modifiers); command.execute(args, modifiers);
} }
}, },