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

Terminal: Scroll cursor into view when typing (#568)

When the user has scrolled up and begins typing, the scrollbar will
automatically return them to the current cursor position so that they
can see what they're typing.
This commit is contained in:
Jesse 2019-09-16 15:52:27 +10:00 committed by Andreas Kling
parent 444a4e4d39
commit 6557a31049

View file

@ -184,6 +184,8 @@ void TerminalWidget::keydown_event(GKeyEvent& event)
write(m_ptm_fd, &ch, 1); write(m_ptm_fd, &ch, 1);
} }
m_scrollbar->set_value(m_scrollbar->max());
} }
void TerminalWidget::paint_event(GPaintEvent& event) void TerminalWidget::paint_event(GPaintEvent& event)