Explorar o código

Terminal: Make it so typing resets the cursor blink timer.

Patch contributed by "pd"
Andreas Kling %!s(int64=6) %!d(string=hai) anos
pai
achega
561bfd3ed6
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      Applications/Terminal/Terminal.cpp

+ 5 - 0
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);