mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 21:58:39 -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
|
// Provide selectAll to terminal viewport
|
||||||
hterm.Terminal.prototype.selectAll = function () {
|
hterm.Terminal.prototype.selectAll = function () {
|
||||||
// We need to clear the DOM range to reset anchorNode
|
// If the cursorNode_ having hyperCaret we need to remove it
|
||||||
selection.clear(this);
|
if (this.cursorNode_.contains(this.hyperCaret)) {
|
||||||
selection.all(this);
|
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;
|
const oldSetFontSize = hterm.Terminal.prototype.setFontSize;
|
||||||
|
|
@ -218,6 +222,10 @@ hterm.Terminal.prototype.copySelectionToClipboard = function () {
|
||||||
// hyper and not the terminal itself
|
// hyper and not the terminal itself
|
||||||
const oldKeyDown = hterm.Keyboard.prototype.onKeyDown_;
|
const oldKeyDown = hterm.Keyboard.prototype.onKeyDown_;
|
||||||
hterm.Keyboard.prototype.onKeyDown_ = function (e) {
|
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;
|
const modifierKeysConf = this.terminal.modifierKeys;
|
||||||
|
|
||||||
if (e.altKey &&
|
if (e.altKey &&
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue