[PATCH]: Provide TUI fast key action with specific readline keymap
Stephane Carrez
stcarrez@nerim.fr
Sat Aug 31 05:34:00 GMT 2002
Hi!
I've committed this patch to improve the TUI as explained in
http://sources.redhat.com/ml/gdb-patches/2002-08/msg00840.html.
I changed a little bit the patch to simplify and use an enum to represent the
3 key-mode states (command, SingleKey, one-command then SingleKey).
To activate SingleKey, it is bound to C-X S.
To leave it, both C-X S and 'q' work.
Note: In http://sources.redhat.com/ml/gdb-patches/2002-08/msg00907.html
I proposed to use C-X C-S to activate; but C-S is very bad as it's
used to stop the terminal output...
Stephane
2002-08-31 Stephane Carrez <stcarrez@nerim.fr>
* tui.c (tui_commands): Table of single key commands.
(tui_rl_command_key): New function to execute gdb command.
(tui_rl_command_mode): New function to temporarily leave SingleKey.
(tui_rl_next_keymap): New function to enter/leave the SingleKey mode.
(tui_rl_startup_hook): New function to avoid prompt display by
readline functions.
(tui_set_key_mode): New function to set the key mode and install
the readline keymap.
(tui_initialize_readline): Create TUI SingleKey readline map.
(tui_enable): Install rl_startup_hook.
(tui_disable): Remove it.
* tui.h (enum tui_key_mode): Declare.
(tui_set_key_mode, tui_current_key_mode): Declare.
* tuiIO.c (tui_redisplay_readline): Don't display the prompt in
SingleKey mode.
* tuiIO.h (tui_redisplay_readline): Declare.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tui-readline-2.diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020831/6477823b/attachment.ksh>
More information about the Gdb-patches
mailing list