This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Minor simplification in tui_default_win_viewport_height


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f4ce562c7f7a95cab61bf298d289cd56f0802a95

commit f4ce562c7f7a95cab61bf298d289cd56f0802a95
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Jul 6 16:28:46 2019 -0600

    Minor simplification in tui_default_win_viewport_height
    
    tui_default_win_viewport_height doesn't need to look at tui_win_list;
    it can simply check the type directly.
    
    gdb/ChangeLog
    2019-08-15  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-layout.c (tui_default_win_viewport_height): Don't
    	examine tui_win_list.

Diff:
---
 gdb/ChangeLog        | 5 +++++
 gdb/tui/tui-layout.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b3d3028..7e7c8a8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-08-15  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui-layout.c (tui_default_win_viewport_height): Don't
+	examine tui_win_list.
+
+2019-08-15  Tom Tromey  <tom@tromey.com>
+
 	* tui/tui-winsource.h (tui_clear_source_content): Don't declare.
 	* tui/tui-winsource.c (tui_update_source_window_as_is): Don't call
 	tui_clear_source_content.
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index c2abcf4..d10c9a0 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -304,7 +304,7 @@ tui_default_win_viewport_height (enum tui_win_type type,
 
   h = tui_default_win_height (type, layout);
 
-  if (tui_win_list[type] == TUI_CMD_WIN)
+  if (type == CMD_WIN)
     h -= 1;
   else
     h -= 2;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]