From 427326a826888b39a38c9f1b497aa981f37b72af Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 22 Feb 2020 11:48:26 -0700 Subject: 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 * 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 --- gdb/tui/tui-layout.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdb/tui/tui-layout.c') 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) -- cgit v1.1