mirror of
https://github.com/KDE/konsole.git
synced 2025-12-29 02:08:11 -05:00
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
that.
This commit is contained in:
committed by
Kurt Hindenburg
parent
13031aa37c
commit
7a1e47686a
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user