fix DECSTBM with LF

This commit is contained in:
Jörg Breitbart
2019-08-02 15:29:26 +02:00
parent a89771a8de
commit 0958f0ef91
4 changed files with 32 additions and 27 deletions
@@ -27,5 +27,5 @@ r
s
t
uvwxyz


The end.
@@ -1,25 +1,25 @@
1
2
6
7
8
9 ABC
6
7
8
9 ABC
DEF
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
yz qrstu vwx
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
yz vwx
The end.
+7 -2
View File
@@ -412,10 +412,13 @@ export class InputHandler extends Disposable implements IInputHandler {
if (wraparoundMode) {
buffer.x = 0;
buffer.y++;
if (buffer.y > buffer.scrollBottom) {
if (buffer.y === buffer.scrollBottom + 1) {
buffer.y--;
this._terminal.scroll(true);
} else {
if (buffer.y >= this._bufferService.rows) {
buffer.y = this._bufferService.rows - 1;
}
// The line already exists (eg. the initial viewport), mark it as a
// wrapped line
buffer.lines.get(buffer.y).isWrapped = true;
@@ -508,9 +511,11 @@ export class InputHandler extends Disposable implements IInputHandler {
buffer.x = 0;
}
buffer.y++;
if (buffer.y > buffer.scrollBottom) {
if (buffer.y === buffer.scrollBottom + 1) {
buffer.y--;
this._terminal.scroll();
} else if (buffer.y >= this._bufferService.rows) {
buffer.y = this._bufferService.rows - 1;
}
// If the end of the line is hit, prevent this action from wrapping around to the next line.
if (buffer.x >= this._bufferService.cols) {
+2 -2
View File
@@ -17,7 +17,7 @@ const ROWS = 25;
const TESTFILES = glob.sync('**/escape_sequence_files/*.in', { cwd: path.join(__dirname, '..')});
const SKIP_FILES = [
't0070-DECSTBM_LF.in', // lineFeed not working correctly
// 't0070-DECSTBM_LF.in', // lineFeed not working correctly
't0071-DECSTBM_IND.in',
't0072-DECSTBM_NEL.in',
't0075-DECSTBM_CUU_CUD.in',
@@ -42,7 +42,7 @@ const FILES = TESTFILES.filter(value => SKIP_FILES.indexOf(value.split('/').slic
describe('Escape Sequence Files', function(): void {
this.timeout(20000);
this.timeout(100);
let ptyTerm: any;
let slaveEnd: any;