diff options
author | Tom Tromey <tom@tromey.com> | 2020-02-22 11:48:26 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-02-22 11:48:28 -0700 |
commit | 427326a826888b39a38c9f1b497aa981f37b72af (patch) | |
tree | 6add38d94856d4c2677f41b60b42be8d6b68ee26 /gdb/tui/tui-layout.c | |
parent | 3fe12b6d67182a81d2ffabbfe405fb5ffc0694b2 (diff) | |
download | gdb-427326a826888b39a38c9f1b497aa981f37b72af.zip gdb-427326a826888b39a38c9f1b497aa981f37b72af.tar.gz gdb-427326a826888b39a38c9f1b497aa981f37b72af.tar.bz2 |
Simplify TUI C-x 2 binding
The TUI "C-x 2" binding tries to switch to a different layout based on
the current layout. Once user-defined layouts are available, this
won't really make sense. I wasn't entirely sure how to handle this.
This patch changes the binding to simply cycle through the existing
layouts. I considered this a reasonable, though not ideal,
compromise.
gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>
* tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
* tui/tui-layout.h (tui_next_layout): Declare.
* tui/tui-layout.c (tui_next_layout): New function.
Change-Id: Ic101f0e3831a4235a048b3090ef60f025f7449bb
Diffstat (limited to 'gdb/tui/tui-layout.c')
-rw-r--r-- | gdb/tui/tui-layout.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index ce1f6a7..6a998e8 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -278,6 +278,13 @@ tui_layout_command (const char *layout_name, int from_tty) tui_set_layout (new_layout); } +/* See tui-layout.h. */ + +void +tui_next_layout () +{ + tui_layout_command ("next", 0); +} static void extract_display_start_addr (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p) |