]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - src/InputHandler.ts
Merge pull request #746 from Tyriar/745_colon_word_sep
[mirror_xterm.js.git] / src / InputHandler.ts
index 780627adb39921404f66d7cd7e36b410bc816b76..34131a15a1ff296453fc2ecc9884fedd2fa840cd 100644 (file)
@@ -57,7 +57,7 @@ export class InputHandler implements IInputHandler {
           this._terminal.y++;
           if (this._terminal.y > this._terminal.scrollBottom) {
             this._terminal.y--;
-            this._terminal.scroll();
+            this._terminal.scroll(true);
           }
         } else {
           if (ch_width === 2)  // FIXME: check for xterm behavior
@@ -75,8 +75,9 @@ export class InputHandler implements IInputHandler {
           const removed = this._terminal.lines.get(this._terminal.y + this._terminal.ybase).pop();
           if (removed[2] === 0
               && this._terminal.lines.get(row)[this._terminal.cols - 2]
-          && this._terminal.lines.get(row)[this._terminal.cols - 2][2] === 2)
+              && this._terminal.lines.get(row)[this._terminal.cols - 2][2] === 2) {
             this._terminal.lines.get(row)[this._terminal.cols - 2] = [this._terminal.curAttr, ' ', 1];
+          }
 
           // insert empty cell at cursor
           this._terminal.lines.get(row).splice(this._terminal.x, 0, [this._terminal.curAttr, ' ', 1]);
@@ -1129,6 +1130,8 @@ export class InputHandler implements IInputHandler {
             this._terminal.scrollBottom = this._terminal.normal.scrollBottom;
             this._terminal.tabs = this._terminal.normal.tabs;
             this._terminal.normal = null;
+            // Ensure the selection manager has the correct buffer
+            this._terminal.selectionManager.setBuffer(this._terminal.lines);
             // if (params === 1049) {
             //   this.x = this.savedX;
             //   this.y = this.savedY;