Fixed translateBufferLineToStringWithWrap to correctly not remove spaces in the middle of a multiline wrapped string

This commit is contained in:
Alex Ross
2018-09-11 16:12:53 -07:00
parent 11426bb0d0
commit 8979eea810
+3 -3
View File
@@ -170,10 +170,10 @@ export class SearchHelper implements ISearchHelper {
let lineWrapsToNext: boolean;
do {
lineString += this._terminal._core.buffer.translateBufferLineToString(lineIndex, true);
lineIndex++;
const nextLine = this._terminal._core.buffer.lines.get(lineIndex);
lineWrapsToNext = nextLine ? this._terminal._core.buffer.lines.get(lineIndex).isWrapped : false;
lineWrapsToNext = nextLine ? nextLine.isWrapped : false;
lineString += this._terminal._core.buffer.translateBufferLineToString(lineIndex, !lineWrapsToNext && trimRight);
lineIndex++;
} while (lineWrapsToNext);
return lineString;