public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Consolidate setting of current_layout
@ 2019-11-12 19:39 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2019-11-12 19:39 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ed2c82c364043cf4726541cc7e8011197185b3f8
commit ed2c82c364043cf4726541cc7e8011197185b3f8
Author: Tom Tromey <tom@tromey.com>
Date: Tue Oct 8 20:06:09 2019 -0600
Consolidate setting of current_layout
Currently several functions in tui-layout.c set current_layout after
their work is done. This moves this assignment to show_layout,
instead.
gdb/ChangeLog
2019-11-12 Tom Tromey <tom@tromey.com>
* tui/tui-layout.c (show_layout): Set current_layout.
(show_source_disasm_command, show_data)
(show_source_or_disasm_and_command): Don't set current_layout.
Change-Id: Id8b23797d68e607f0fcd6d29b8801869d40d1869
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/tui/tui-layout.c | 5 +----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f1a05e2..23095e0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2019-11-12 Tom Tromey <tom@tromey.com>
+ * tui/tui-layout.c (show_layout): Set current_layout.
+ (show_source_disasm_command, show_data)
+ (show_source_or_disasm_and_command): Don't set current_layout.
+
+2019-11-12 Tom Tromey <tom@tromey.com>
+
* tui/tui-layout.c (_initialize_tui_layout): Move to end.
2019-11-12 Tom Tromey <tom@tromey.com>
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index c7f6545..ba0b367 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -91,6 +91,7 @@ show_layout (enum tui_layout_type layout)
break;
}
+ current_layout = layout;
tui_delete_invisible_windows ();
}
}
@@ -418,7 +419,6 @@ show_source_disasm_command (void)
tui_term_width (),
0,
tui_term_height () - cmd_height);
- current_layout = SRC_DISASSEM_COMMAND;
}
@@ -461,8 +461,6 @@ show_data (enum tui_layout_type new_layout)
0, total_height - 1);
TUI_CMD_WIN->resize (TUI_CMD_WIN->height, tui_term_width (),
0, total_height);
-
- current_layout = new_layout;
}
void
@@ -541,7 +539,6 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
tui_term_width (),
0,
src_height);
- current_layout = layout_type;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-11-12 19:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 19:39 [binutils-gdb] Consolidate setting of current_layout Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).