1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:37:46 +00:00

LibVT: Don't return a history size if alternate buffer is used

The line history is unavailable if the alternate screen buffer is
currently enabled. However, since TerminalWidget uses the history size
to offset its line numbers when rendering, it will try to render
inaccessible lines once the history is not empty anymore.
This commit is contained in:
Tim Schumacher 2021-06-05 14:13:50 +02:00 committed by Andreas Kling
parent 0625342382
commit 1618cffb75

View file

@ -156,7 +156,7 @@ public:
} }
m_max_history_lines = value; m_max_history_lines = value;
} }
size_t history_size() const { return m_history.size(); } size_t history_size() const { return m_use_alternate_screen_buffer ? 0 : m_history.size(); }
#endif #endif
void inject_string(const StringView&); void inject_string(const StringView&);