mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 16:14:12 +01:00
Somewhat better Y and :yank copy behavior that should work as expected on OS-X.
This commit is contained in:
@@ -481,10 +481,7 @@ const Buffer = Module("buffer", {
|
||||
controller.setCaretEnabled(caretmode);
|
||||
return String.match(selection, /\w*/)[0];
|
||||
}
|
||||
if (util.computedStyle(range.startContainer).whiteSpace == "pre"
|
||||
&& util.computedStyle(range.endContainer).whiteSpace == "pre")
|
||||
return String(range);
|
||||
return String(selection);
|
||||
return util.domToString(range);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -583,9 +583,6 @@ const CommandLine = Module("commandline", {
|
||||
this._lastMowOutput = <div class="ex-command-output" style={"white-space: " + style} highlight={highlightGroup}>{str}</div>;
|
||||
let output = util.xmlToDom(this._lastMowOutput, doc);
|
||||
|
||||
if (!silent)
|
||||
dactyl.triggerObserver("echoMultiline", str, highlightGroup, output);
|
||||
|
||||
// FIXME: need to make sure an open MOW is closed when commands
|
||||
// that don't generate output are executed
|
||||
if (this.widgets.mowContainer.collapsed)
|
||||
@@ -593,6 +590,9 @@ const CommandLine = Module("commandline", {
|
||||
|
||||
doc.body.appendChild(output);
|
||||
|
||||
if (!silent)
|
||||
dactyl.triggerObserver("echoMultiline", str, highlightGroup, output);
|
||||
|
||||
commandline.updateOutputHeight(true);
|
||||
|
||||
if (options["more"] && win.scrollMaxY > 0) {
|
||||
@@ -1162,11 +1162,9 @@ const CommandLine = Module("commandline", {
|
||||
dactyl.registerObserver("echoLine", observe, true);
|
||||
dactyl.registerObserver("echoMultiline", observe, true);
|
||||
function observe(str, highlight, dom) {
|
||||
if (!observe.done)
|
||||
buffer.push(dom ? util.domToString(dom) : str)
|
||||
buffer.push(dom ? util.domToString(dom) : str)
|
||||
}
|
||||
dactyl.trapErrors.apply(dactyl, [fn, self].concat(Array.slice(arguments, 2)));
|
||||
observe.done = true;
|
||||
return buffer.join("\n");
|
||||
}
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user