This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 2/3] TUI: Don't print KEY_RESIZE keys
- From: Patrick Palka <patrick at parcs dot ath dot cx>
- To: gdb-patches at sourceware dot org
- Cc: Patrick Palka <patrick at parcs dot ath dot cx>
- Date: Wed, 7 Jan 2015 23:04:44 -0500
- Subject: [PATCH 2/3] TUI: Don't print KEY_RESIZE keys
- Authentication-results: sourceware.org; auth=none
- References: <1420689885-31156-1-git-send-email-patrick at parcs dot ath dot cx>
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