This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/3] TUI: Don't print KEY_RESIZE keys


wgetch() sometimes returns KEY_RESIZE when ncurses detects that the
terminal has been resized.  This character then gets passed on to
readline which interprets it as a multibyte character.  Instead of
passing on this character to readline, intercept it as a (no-op) control
character and pass '\0' to readline.

gdb/ChangeLog:

	* tui/tui-command.c (tui_dispatch_ctrl_char): Ignore KEY_RESIZE
	keys.
---
 gdb/tui/tui-command.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c
index d1a5ddb..dfcf512 100644
--- a/gdb/tui/tui-command.c
+++ b/gdb/tui/tui-command.c
@@ -121,6 +121,7 @@ tui_dispatch_ctrl_char (unsigned int ch)
 	  tui_scroll_right (win_info, 1);
 	  break;
 	case '\f':
+	case KEY_RESIZE:
           break;
 	default:
 	  c = ch_copy;
-- 
2.2.1.212.gc5b9256


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]