diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-24 16:37:48 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-09-20 13:49:08 -0600 |
commit | 1b935acf7ecc2df4649b7d34b7ac467eac07221b (patch) | |
tree | 47410f9482378415bcf0b2afd176903e8da16991 /gdb/tui/tui-layout.c | |
parent | 9abd8a65c1298258c005af3f80bdc4da9726ee05 (diff) | |
download | gdb-1b935acf7ecc2df4649b7d34b7ac467eac07221b.zip gdb-1b935acf7ecc2df4649b7d34b7ac467eac07221b.tar.gz gdb-1b935acf7ecc2df4649b7d34b7ac467eac07221b.tar.bz2 |
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.
Diffstat (limited to 'gdb/tui/tui-layout.c')
-rw-r--r-- | gdb/tui/tui-layout.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 33d3dd6..03115a7 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -511,10 +511,8 @@ show_source_disasm_command (void) tui_term_width (), 0, src_height - 1); - locator->resize (2 /* 1 */ , - tui_term_width (), - 0, - (src_height + asm_height) - 1); + locator->resize (1, tui_term_width (), + 0, (src_height + asm_height) - 1); if (TUI_CMD_WIN == NULL) tui_win_list[CMD_WIN] = new tui_cmd_window (); @@ -561,10 +559,8 @@ show_data (enum tui_layout_type new_layout) tui_term_width (), 0, data_height - 1); - locator->resize (2 /* 1 */ , - tui_term_width (), - 0, - total_height - 1); + locator->resize (1, tui_term_width (), + 0, total_height - 1); TUI_CMD_WIN->resize (TUI_CMD_WIN->height, tui_term_width (), 0, total_height); @@ -635,10 +631,8 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type) win_info = TUI_DISASM_WIN; } - locator->resize (2 /* 1 */ , - tui_term_width (), - 0, - src_height - 1); + locator->resize (1, tui_term_width (), + 0, src_height - 1); win_info->resize (src_height - 1, tui_term_width (), 0, |