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.
This commit is contained in:
Tom Tromey
2019-07-06 16:28:46 -06:00
parent c398c3d0b5
commit f4ce562c7f
2 changed files with 6 additions and 1 deletions

View 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.

View 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;