Commit 7a1e4768 authored by Luis Javier Merino's avatar Luis Javier Merino Committed by Kurt Hindenburg
Browse files

Fix remembering selection in scrollback buffer

Commit d37d3ac1 "CompactHistoryScroll: Remove _maxLineCount + 5 lines at
a time" caused a regression: addHistLine queried the number of lines in
history before and after adding a line, and if it had not incremented it
assumed one line entered history and another was dropped at the other
end.  Now, lines are dropped from history in batches, so take care of
parent 13031aa3
Pipeline #119889 passed with stage
in 1 minute and 54 seconds
......@@ -1693,10 +1693,10 @@ void Screen::addHistLine()
bool beginIsTL = (_selBegin == _selTopLeft);
// Adjust selection for the new point of reference
if (newHistLines > oldHistLines) {
if (newHistLines != oldHistLines) {
if (_selBegin != -1) {
_selTopLeft += _columns;
_selBottomRight += _columns;
_selTopLeft += _columns * (newHistLines - oldHistLines);
_selBottomRight += _columns * (newHistLines - oldHistLines);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment