mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:58:11 +00: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
2 changed files with 11 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue