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;