mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
cmd+A work again (#1102)
This commit is contained in:
parent
59a3583028
commit
a45fb97283
1 changed files with 11 additions and 3 deletions
14
lib/hterm.js
14
lib/hterm.js
|
|
@ -15,9 +15,13 @@ const containers = [];
|
|||
|
||||
// Provide selectAll to terminal viewport
|
||||
hterm.Terminal.prototype.selectAll = function () {
|
||||
// We need to clear the DOM range to reset anchorNode
|
||||
selection.clear(this);
|
||||
selection.all(this);
|
||||
// If the cursorNode_ having hyperCaret we need to remove it
|
||||
if (this.cursorNode_.contains(this.hyperCaret)) {
|
||||
this.cursorNode_.removeChild(this.hyperCaret);
|
||||
// We need to clear the DOM range to reset anchorNode
|
||||
selection.clear(this);
|
||||
selection.all(this);
|
||||
}
|
||||
};
|
||||
|
||||
const oldSetFontSize = hterm.Terminal.prototype.setFontSize;
|
||||
|
|
@ -218,6 +222,10 @@ hterm.Terminal.prototype.copySelectionToClipboard = function () {
|
|||
// hyper and not the terminal itself
|
||||
const oldKeyDown = hterm.Keyboard.prototype.onKeyDown_;
|
||||
hterm.Keyboard.prototype.onKeyDown_ = function (e) {
|
||||
// Was the hyperCaret removed for selectAll
|
||||
if (!this.terminal.cursorNode_.contains(this.hyperCaret)) {
|
||||
this.terminal.focusHyperCaret();
|
||||
}
|
||||
const modifierKeysConf = this.terminal.modifierKeys;
|
||||
|
||||
if (e.altKey &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue