1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibVT: Copying from terminal scrollback resulted in wrong text

This regressed when turning the terminal history into a circular buffer
as only the non-const version of Terminal::line() was updated with
the new indexing logic.
This commit is contained in:
Andreas Kling 2020-11-03 20:02:57 +01:00
parent 060ddd2a7a
commit cfce6b37be

View file

@ -81,9 +81,7 @@ public:
}
const Line& line(size_t index) const
{
if (index < m_history.size())
return m_history[index];
return m_lines[index - m_history.size()];
return const_cast<Terminal*>(this)->line(index);
}
Line& visible_line(size_t index)