Minor simplification in tui_default_win_viewport_height
authorTom Tromey <tom@tromey.com>
Sat, 6 Jul 2019 22:28:46 +0000 (16:28 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 15 Aug 2019 18:29:28 +0000 (12:29 -0600)
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.

gdb/ChangeLog
gdb/tui/tui-layout.c

index b3d3028fc5c2221ee0c58ec0bf08ac87906a2c78..7e7c8a8320d6f24fd9ca8c65d183e98082715f15 100644 (file)
@@ -1,3 +1,8 @@
+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.
index c2abcf4429d2f80aae06f995e5b2f10bcb664d2c..d10c9a043d656b288d9905c54f30afdde939cffa 100644 (file)
@@ -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;