Base wrapped line on current width, not original width

Lines are never trimmed, so even if the term's size is reduced it
could contain empty lines at the end when wrapping is valid
This commit is contained in:
Daniel Imms
2017-10-29 13:16:29 -07:00
parent d7f6f96ba6
commit aa5a9911de
+1 -1
View File
@@ -43,7 +43,7 @@ declare var define: any;
// wrapped.
this.on('lineFeed', () => {
const line = this.buffer.lines.get(this.buffer.ybase + this.buffer.y - 1);
const lastChar = line[line.length - 1];
const lastChar = line[this.cols - 1];
if (lastChar[3] !== 32 /* ' ' */) {
const nextLine = this.buffer.lines.get(this.buffer.ybase + this.buffer.y);
(<any>nextLine).isWrapped = true;