[Lldb-commits] [lldb] 8739445 - [lldb] force full gui redraw on Ctrl+L

Luboš Luňák via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 31 13:03:08 PDT 2020


Author: Luboš Luňák
Date: 2020-07-31T22:02:40+02:00
New Revision: 8739445e3221ea05bc71a592f4114e10510b0b34

URL: https://github.com/llvm/llvm-project/commit/8739445e3221ea05bc71a592f4114e10510b0b34
DIFF: https://github.com/llvm/llvm-project/commit/8739445e3221ea05bc71a592f4114e10510b0b34.diff

LOG: [lldb] force full gui redraw on Ctrl+L

As is common with curses apps, this allows to redraw everything
in case something corrupts the screen. Apparently key modifiers
are difficult with curses (curses FAQ it "doesn't do that"),
thankfully Ctrl+key are simply control characters, so it's
(ascii & 037) => 12.

Differential Revision: https://reviews.llvm.org/D84972

Added: 
    

Modified: 
    lldb/source/Core/IOHandlerCursesGUI.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp
index fda3aa188679..262a19dc04b4 100644
--- a/lldb/source/Core/IOHandlerCursesGUI.cpp
+++ b/lldb/source/Core/IOHandlerCursesGUI.cpp
@@ -1287,6 +1287,10 @@ class Application {
           update = true;
           break;
         case eKeyNotHandled:
+          if (ch == 12) { // Ctrl+L, force full redraw
+            redrawwin(m_window_sp->get());
+            update = true;
+          }
           break;
         case eQuitApplication:
           done = true;


        


More information about the lldb-commits mailing list