summaryrefslogtreecommitdiff
path: root/Applications/Terminal
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-06-28 21:46:23 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-06-28 21:46:23 +0200
commit561bfd3ed6f8331ece45cc2e6b8d97c4b26986b8 (patch)
tree911be9b37bf516daf4c1bb316f8033a95b4ccdfd /Applications/Terminal
parent96ca8bea6cf9419be07af63bb1c865526e762599 (diff)
downloadserenity-561bfd3ed6f8331ece45cc2e6b8d97c4b26986b8.zip
Terminal: Make it so typing resets the cursor blink timer.
Patch contributed by "pd"
Diffstat (limited to 'Applications/Terminal')
-rw-r--r--Applications/Terminal/Terminal.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Applications/Terminal/Terminal.cpp b/Applications/Terminal/Terminal.cpp
index 10a88ee0f4..80efcef77f 100644
--- a/Applications/Terminal/Terminal.cpp
+++ b/Applications/Terminal/Terminal.cpp
@@ -1010,6 +1010,11 @@ void Terminal::event(CEvent& event)
void Terminal::keydown_event(GKeyEvent& event)
{
+ // Reset timer so cursor doesn't blink while typing.
+ m_cursor_blink_timer.stop();
+ m_cursor_blink_state = true;
+ m_cursor_blink_timer.start();
+
switch (event.key()) {
case KeyCode::Key_Up:
write(m_ptm_fd, "\033[A", 3);