1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 02:07:58 +01:00

Better :yank formatting.

This commit is contained in:
Kris Maglione
2010-10-14 22:06:17 -04:00
parent 7853331e7c
commit bea1c20858
6 changed files with 29 additions and 8 deletions

View File

@@ -1161,9 +1161,11 @@ const CommandLine = Module("commandline", {
dactyl.registerObserver("echoLine", observe, true);
dactyl.registerObserver("echoMultiline", observe, true);
function observe(str, highlight, dom) {
buffer.push(dom ? dom.textContent : str)
if (!observe.done)
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");
}
}, {