mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 21:28:00 +01:00
Fix double command output for things like :ls|ls
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
@@ -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;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user