mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Handle going back and up in the alt buffer from a long line to a short line
This commit is contained in:
@@ -39,8 +39,14 @@ export class AltClickHandler {
|
||||
if (this._terminal.buffer === this._terminal.buffers.normal) {
|
||||
keyboardArrows = this.buildArrowSequence(this.normalCharCount(), this.horizontalCursorCommand(this.normalMoveForward()));
|
||||
} else {
|
||||
keyboardArrows = this.buildArrowSequence(this.altVerticalCharCount(), this.verticalCursorCommand(this.altMoveUpward()));
|
||||
keyboardArrows += this.buildArrowSequence(this.altHorizontalCharCount(), this.horizontalCursorCommand(this.altMoveForward()));
|
||||
let verticalChars = this.buildArrowSequence(this.altVerticalCharCount(), this.verticalCursorCommand(this.altMoveUpward()));
|
||||
let horizontalChars = this.buildArrowSequence(this.altHorizontalCharCount(), this.horizontalCursorCommand(this.altMoveForward()));
|
||||
|
||||
if (this.altMoveForward()) {
|
||||
keyboardArrows = verticalChars + horizontalChars
|
||||
} else {
|
||||
keyboardArrows = horizontalChars + verticalChars
|
||||
}
|
||||
}
|
||||
|
||||
this._terminal.send(keyboardArrows);
|
||||
|
||||
Reference in New Issue
Block a user