From aa5a9911de92e87a262ebad475c8df976d567da4 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 29 Oct 2017 13:16:29 -0700 Subject: [PATCH] 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 --- src/addons/winptyCompat/winptyCompat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addons/winptyCompat/winptyCompat.ts b/src/addons/winptyCompat/winptyCompat.ts index 1c289c70..7474df2e 100644 --- a/src/addons/winptyCompat/winptyCompat.ts +++ b/src/addons/winptyCompat/winptyCompat.ts @@ -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); (nextLine).isWrapped = true;