mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 18:37:58 +03:00
LibVT: Update the terminal buffer based on visible lines
Lines in the history should not be considered for update at all. Fixes #2185
This commit is contained in:
parent
87b6578516
commit
5b9fe0cf46
Notes:
sideshowbarker
2024-07-19 06:44:35 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/5b9fe0cf46e Pull-request: https://github.com/SerenityOS/serenity/pull/2191 Issue: https://github.com/SerenityOS/serenity/issues/2185
@ -144,6 +144,15 @@ public:
|
||||
return m_lines[index - m_history.size()];
|
||||
}
|
||||
|
||||
Line& visible_line(size_t index)
|
||||
{
|
||||
return m_lines[index];
|
||||
}
|
||||
const Line& visible_line(size_t index) const
|
||||
{
|
||||
return m_lines[index];
|
||||
}
|
||||
|
||||
size_t max_history_size() const { return 500; }
|
||||
const NonnullOwnPtrVector<Line>& history() const { return m_history; }
|
||||
|
||||
|
@ -465,9 +465,9 @@ void TerminalWidget::flush_dirty_lines()
|
||||
}
|
||||
Gfx::Rect rect;
|
||||
for (int i = 0; i < m_terminal.rows(); ++i) {
|
||||
if (m_terminal.line(i).dirty) {
|
||||
if (m_terminal.visible_line(i).dirty) {
|
||||
rect = rect.united(row_rect(i));
|
||||
m_terminal.line(i).dirty = false;
|
||||
m_terminal.visible_line(i).dirty = false;
|
||||
}
|
||||
}
|
||||
update(rect);
|
||||
|
Loading…
Reference in New Issue
Block a user