diff options
Diffstat (limited to 'Libraries/LibVT')
-rw-r--r-- | Libraries/LibVT/Terminal.h | 9 | ||||
-rw-r--r-- | Libraries/LibVT/TerminalWidget.cpp | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Libraries/LibVT/Terminal.h b/Libraries/LibVT/Terminal.h index e3946e2fe3..38f42dcdb8 100644 --- a/Libraries/LibVT/Terminal.h +++ b/Libraries/LibVT/Terminal.h @@ -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; } diff --git a/Libraries/LibVT/TerminalWidget.cpp b/Libraries/LibVT/TerminalWidget.cpp index 845650e0d3..c8db17f80c 100644 --- a/Libraries/LibVT/TerminalWidget.cpp +++ b/Libraries/LibVT/TerminalWidget.cpp @@ -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); |