Merge pull request #1535 from 7PH/master

#1532: 'Reset to Initial State' (RIS) escape sequence no longer makes the cursor disappear
This commit is contained in:
Daniel Imms
2018-06-27 07:09:49 -07:00
committed by GitHub
2 changed files with 13 additions and 0 deletions
+11
View File
@@ -120,6 +120,17 @@ describe('term.js addons', () => {
});
});
describe('reset', () => {
it('should not affect cursorState', () => {
term.cursorState = 1;
term.reset();
assert.equal(term.cursorState, 1);
term.cursorState = 0;
term.reset();
assert.equal(term.cursorState, 0);
});
});
describe('clear', () => {
it('should clear a buffer equal to rows', () => {
const promptLine = term.buffer.lines.get(term.buffer.ybase + term.buffer.y);
+2
View File
@@ -1830,9 +1830,11 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
this.options.cols = this.cols;
const customKeyEventHandler = this._customKeyEventHandler;
const inputHandler = this._inputHandler;
const cursorState = this.cursorState;
this._setup();
this._customKeyEventHandler = customKeyEventHandler;
this._inputHandler = inputHandler;
this.cursorState = cursorState;
this.refresh(0, this.rows - 1);
if (this.viewport) {
this.viewport.syncScrollArea();