Bug 11393 - vi-mode keybindings don't work in TUI mode
Summary: vi-mode keybindings don't work in TUI mode
Status: RESOLVED WORKSFORME
Alias: None
Product: gdb
Classification: Unclassified
Component: tui (show other bugs)
Version: 7.0
: P2 normal
Target Milestone: 7.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-17 05:04 UTC by Justin Lebar
Modified: 2021-04-02 19:55 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2012-11-10 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lebar 2010-03-17 05:04:04 UTC
gdb 7.0-ubuntu

STR:
* Start debugging
    $ gdb a.out
* Switch to vi mode
    (gdb) <ctrl+alt+j>
* Start running, pause execution, then switch to TUI mode:
    (gdb) r
    (gdb) <ctrl+c>
    (gdb) layout next
* Use a vi-mode shortcut, e.g.
    (gdb) asdf <esc> <h>

Expected results:
The cursor moves left.

Actual results:
The cursor doesn't move left, because we're not in vi-mode.
Comment 1 Stephane Carrez 2012-11-10 14:14:20 UTC
Confirmed 7.5.

The problem comes from the TUI initialization that uses
the default readline keymap to setup specific key bindings.
Once we switch to TUI mode, we set our own keymap which comes from Emacs.

The TUI should manager a vi keymap override as it does for emacs
and detect which keymap is installed.

There is the issue of switching keymap when the TUI is active.
Comment 2 Tom Tromey 2018-09-03 18:31:11 UTC
I tried this and as far as I can tell it works for me in git master gdb (8.3).
It would be nice if someone else could verify.
Comment 3 Tom Tromey 2021-04-02 19:55:26 UTC
No responses.