diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-09 17:29:13 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-15 14:17:11 -0600 |
commit | 3df505f60eacd2c931092c7007f084d27583f9e5 (patch) | |
tree | 46ba8a87a1473d10e92433f803684184ff378948 /gdb/testsuite | |
parent | 272560b577894c388a3d0d3fda8294683714f582 (diff) | |
download | gdb-3df505f60eacd2c931092c7007f084d27583f9e5.zip gdb-3df505f60eacd2c931092c7007f084d27583f9e5.tar.gz gdb-3df505f60eacd2c931092c7007f084d27583f9e5.tar.bz2 |
TUI resize unification
The TUI currently has two different ways to resize a window: the
resize method, and the methods make_invisible_and_set_new_height and
make_visible_with_new_height.
There's no deep reason to have two different ways to resize a window,
so this patch unifies them, leaving just the "resize" method.
This also changes the locator to be handled more like an ordinary
window and less like an adjunct of the associated source window.
gdb/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* tui/tui-io.c (tui_puts_internal): Check TUI_CMD_WIN before
calling update_cmdwin_start_line.
* tui/tui-winsource.h (struct tui_source_window_base)
<do_make_visible_with_new_height, set_new_height>: Don't declare.
<rerender>: Declare.
* tui/tui-winsource.c (tui_source_window_base::update_tab_width):
Call rerender.
(tui_source_window_base::set_new_height): Remove.
(tui_source_window_base::rerender): Rename from
do_make_visible_with_new_height.
* tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Use
resize method.
(tui_win_info::make_invisible_and_set_new_height)
(tui_win_info::make_visible_with_new_height): Remove.
* tui/tui-stack.h (struct tui_locator_window) <rerender>:
Declare.
* tui/tui-stack.c (tui_locator_window::rerender): New method.
* tui/tui-regs.h (struct tui_data_window) <set_new_height,
do_make_visible_with_new_height>: Don't declare.
<rerender>: Declare.
* tui/tui-regs.c (tui_data_window::rerender): Rename from
set_new_height.
(tui_data_window::do_make_visible_with_new_height): Remove.
* tui/tui-layout.c (show_source_disasm_command, show_data): Don't
call tui_show_locator_content.
(tui_gen_win_info::resize): Call rerender.
(show_source_or_disasm_and_command): Don't call
tui_show_locator_content.
* tui/tui-data.h (struct tui_gen_win_info) <rerender>: New
method.
(struct tui_win_info) <rerender>: Declare.
<set_new_height, make_invisible_and_set_new_height,
make_visible_with_new_height>: Don't declare.
* tui/tui-data.c (tui_win_list::rerender): New method.
* tui/tui-command.h (struct tui_cmd_window)
<do_make_visible_with_new_height>: Don't declare.
* tui/tui-command.c
(tui_cmd_window::do_make_visible_with_new_height): Remove.
gdb/testsuite/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* gdb.tui/empty.exp: Enable resizing tests.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/empty.exp | 18 |
2 files changed, 12 insertions, 10 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index def8a31..294243a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-08-15 Tom Tromey <tom@tromey.com> + + * gdb.tui/empty.exp: Enable resizing tests. + 2019-08-15 Tom Tromey <tromey@adacore.com> * gdb.ada/char_enum.exp: Add regression tests. diff --git a/gdb/testsuite/gdb.tui/empty.exp b/gdb/testsuite/gdb.tui/empty.exp index 90e26b3..8c50456 100644 --- a/gdb/testsuite/gdb.tui/empty.exp +++ b/gdb/testsuite/gdb.tui/empty.exp @@ -39,14 +39,14 @@ set layouts { {"no source" "No Source Available"} {"no regs" "Register Values Unavailable"} }} - {asm asm {{3 0 77 15}} {{3 0 87 24}} + {asm asm {{3 0 77 15}} {{3 0 87 23}} {"no asm" "No Assembly Available"}} {regs asm-regs {{0 0 80 8} {3 7 77 9}} {{0 0 90 13} {3 13 87 14}} { {"no asm" "No Assembly Available"} {"no regs" "Register Values Unavailable"} }} - {split split {{3 0 77 8} {3 7 77 9}} {{3 0 87 14} {3 14 87 14}} + {split split {{3 0 77 8} {3 7 77 9}} {{3 0 87 13} {3 13 87 14}} { {"no source" "No Source Available"} {"no asm" "No Assembly Available"} @@ -91,13 +91,11 @@ foreach layout $layouts { check_text $text_list } - # FIXME: resizing is broken enough that we don't test it for - # now. - # Term::resize 40 90 - # with_test_prefix 90x40 { - # check_boxes $large_boxes - # check_text $text_list - # } - # Term::resize 24 80 + Term::resize 40 90 + with_test_prefix 90x40 { + check_boxes $large_boxes + check_text $text_list + } + Term::resize 24 80 } } |