Ignore non-real chars for selection in history

Commit e8f77101 did this for screen lines.  Do it also for lines in the
history buffer.
This commit is contained in:
Luis Javier Merino Morán
2022-05-23 10:28:13 +02:00
committed by Tomaz Canabrava
parent 4e69f47b06
commit 9046680f5a

View File

@@ -1636,6 +1636,12 @@ int Screen::copyLineToStream(int line,
_history->getCells(line, start, count, characterBuffer);
// Exclude trailing empty cells from count and don't bother processing them further.
// See the comment on the similar case for screen lines for an explanation.
while (count > 0 && !characterBuffer[start + count - 1].isRealCharacter) {
count--;
}
if (_history->isWrappedLine(line)) {
currentLineProperties |= LINE_WRAPPED;
} else {