Fix more cases where ' ' doesn't have code

This commit is contained in:
Daniel Imms
2017-08-31 23:28:42 -07:00
parent 81d93b8fbf
commit 848c85c1eb
+6 -3
View File
@@ -1983,7 +1983,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
if (!line) {
return;
}
const ch: CharData = [this.eraseAttr(), ' ', 1]; // xterm
const ch: CharData = [this.eraseAttr(), ' ', 1, 32 /* ' '.charCodeAt(0) */]; // xterm
for (; x < this.cols; x++) {
line[x] = ch;
}
@@ -2000,7 +2000,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
if (!line) {
return;
}
const ch: CharData = [this.eraseAttr(), ' ', 1]; // xterm
const ch: CharData = [this.eraseAttr(), ' ', 1, 32 /* ' '.charCodeAt(0) */]; // xterm
x++;
while (x--) {
line[x] = ch;
@@ -2068,7 +2068,10 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
* @param cur
*/
public ch(cur?: boolean): CharData {
return cur ? [this.eraseAttr(), ' ', 1] : [this.defAttr, ' ', 1];
if (cur) {
return [this.eraseAttr(), ' ', 1, 32 /* ' '.charCodeAt(0) */];
}
return [this.defAttr, ' ', 1, 32 /* ' '.charCodeAt(0) */];
}
/**