Set TUI locator height to 1
authorTom Tromey <tom@tromey.com>
Wed, 24 Jul 2019 22:37:48 +0000 (16:37 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 20 Sep 2019 19:49:08 +0000 (13:49 -0600)
commit1b935acf7ecc2df4649b7d34b7ac467eac07221b
tree47410f9482378415bcf0b2afd176903e8da16991
parent9abd8a65c1298258c005af3f80bdc4da9726ee05
Set TUI locator height to 1

The TUI has long had code to resize the locator, using 2 as the
height.  However the code has "1" in a comment, like:

    locator->resize (2 /* 1 */ ,

This patch fixes the resizing code to set the height to 1.  Doing this
revealed what was probably the reason for setting the height to 2 in
the first place: this caused the locator window to scroll.  However,
this is easily handled by calling scrollok on the locator window.

gdb/ChangeLog
2019-09-20  Tom Tromey  <tom@tromey.com>

* tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Use 1 as
height for locator.
* tui/tui-stack.c (tui_locator_window::rerender): Call scrollok.
* tui/tui-layout.c (show_source_disasm_command, show_data)
(show_source_or_disasm_and_command): Use 1 as height for locator.
gdb/ChangeLog
gdb/tui/tui-layout.c
gdb/tui/tui-stack.c
gdb/tui/tui-win.c