change NULL_CHAR and trim

This commit is contained in:
Jörg Breitbart
2018-10-31 12:42:56 +01:00
parent 160b4a7d66
commit ee6fa6ca00
4 changed files with 54 additions and 5 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ function terminalToString(term: Terminal): string {
for (let line = term.buffer.ybase; line < term.buffer.ybase + term.rows; line++) {
lineText = '';
for (let cell = 0; cell < term.cols; ++cell) {
lineText += term.buffer.lines.get(line).get(cell)[CHAR_DATA_CHAR_INDEX];
lineText += term.buffer.lines.get(line).get(cell)[CHAR_DATA_CHAR_INDEX] || ' ';
}
// rtrim empty cells as xterm does
lineText = lineText.replace(/\s+$/, '');