+2020-02-22 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-regs.c (tui_reg_layout): Remove.
+ (tui_reg_command): Use tui_regs_layout.
+ * tui/tui-layout.h (tui_reg_command): Declare.
+ * tui/tui-layout.c (tui_reg_command): New function.
+
2020-02-22 Tom Tromey <tom@tromey.com>
* tui/tui.c (tui_rl_delete_other_windows): Call
/* Switch to the next layout. */
extern void tui_next_layout ();
+/* Show the register window. Like "layout regs". */
+extern void tui_regs_layout ();
+
/* Remove some windows from the layout, leaving only the focused
window and the command window; if no window has the focus, then
some other window is chosen to remain. */
return group;
}
-/* A helper function to display the register window in the appropriate
- way. */
-
-static void
-tui_reg_layout ()
-{
- enum tui_layout_type cur_layout = tui_current_layout ();
- enum tui_layout_type new_layout;
- if (cur_layout == SRC_COMMAND || cur_layout == SRC_DATA_COMMAND)
- new_layout = SRC_DATA_COMMAND;
- else
- new_layout = DISASSEM_DATA_COMMAND;
- tui_set_layout (new_layout);
-}
-
/* Implement the 'tui reg' command. Changes the register group displayed
in the tui register window. Displays the tui register window if it is
not already on display. */
appropriate layout. We need to do this before trying to run the
'next' or 'prev' commands. */
if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->is_visible ())
- tui_reg_layout ();
+ tui_regs_layout ();
struct reggroup *current_group = TUI_DATA_WIN->get_current_group ();
if (strncmp (args, "next", len) == 0)