From 8979eea810400cdfc32ad08265a0ae31b554aed9 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Tue, 11 Sep 2018 16:12:53 -0700 Subject: [PATCH] Fixed translateBufferLineToStringWithWrap to correctly not remove spaces in the middle of a multiline wrapped string --- src/addons/search/SearchHelper.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/addons/search/SearchHelper.ts b/src/addons/search/SearchHelper.ts index 4cc13e63..051fa047 100644 --- a/src/addons/search/SearchHelper.ts +++ b/src/addons/search/SearchHelper.ts @@ -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;