mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:27:35 +00:00
Kernel+LibVT: Fix selection with scrollback wrap-around
If lines are removed from the tail of the scrollback buffer, the previous line indices will refer to different lines; therefore we need to offset them.
This commit is contained in:
parent
13991eade7
commit
ce9460de59
7 changed files with 23 additions and 10 deletions
|
@ -42,6 +42,12 @@ public:
|
|||
m_end = end;
|
||||
}
|
||||
|
||||
void offset_row(int delta)
|
||||
{
|
||||
m_start = Position(m_start.row() + delta, m_start.column());
|
||||
m_end = Position(m_end.row() + delta, m_end.column());
|
||||
}
|
||||
|
||||
bool operator==(const Range& other) const
|
||||
{
|
||||
return m_start == other.m_start && m_end == other.m_end;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue