diff options
author | Jesse <jesse.buhagiar@student.rmit.edu.au> | 2019-09-16 15:52:27 +1000 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-16 07:52:27 +0200 |
commit | 6557a31049680af85eb94b4cec9bf9dc30accaa0 (patch) | |
tree | c29811501452dd9e64156a5b513f9ed07e6d7f11 /Applications | |
parent | 444a4e4d391f7c74a8ecda04fd072fdad6e49582 (diff) | |
download | serenity-6557a31049680af85eb94b4cec9bf9dc30accaa0.zip |
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.
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/Terminal/TerminalWidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Applications/Terminal/TerminalWidget.cpp b/Applications/Terminal/TerminalWidget.cpp index d4a1badcd2..1ab140e603 100644 --- a/Applications/Terminal/TerminalWidget.cpp +++ b/Applications/Terminal/TerminalWidget.cpp @@ -184,6 +184,8 @@ void TerminalWidget::keydown_event(GKeyEvent& event) write(m_ptm_fd, &ch, 1); } + + m_scrollbar->set_value(m_scrollbar->max()); } void TerminalWidget::paint_event(GPaintEvent& event) |