From 3d97994549706f8f65fe9726b1fec1f0d643f822 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 9 Oct 2019 21:18:31 -0600 Subject: Re-apply the current layout when resizing The TUI has separate code for each possible layout to handle the case where the terminal window is resized. With the new layout code, this can all be replaced with a call to tui_apply_current_layout, which simply re-applies the current layout. This results in some small differences in behavior when resizing, so some tests are updated. gdb/ChangeLog 2019-12-11 Tom Tromey * tui/tui-win.c (tui_resize_all): Remove code, call tui_apply_current_layout. gdb/testsuite/ChangeLog 2019-12-11 Tom Tromey * gdb.tui/resize.exp: Update. * gdb.tui/empty.exp (layouts): Update. Change-Id: I3dc6c02a753d495d9ab5e8213d550a147198ce6f --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.tui/empty.exp | 12 ++++++------ gdb/testsuite/gdb.tui/resize.exp | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9b7a81e..cf3fcb7 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2019-12-11 Tom Tromey + * gdb.tui/resize.exp: Update. + * gdb.tui/empty.exp (layouts): Update. + +2019-12-11 Tom Tromey + * gdb.tui/regs.exp: Update. * gdb.tui/empty.exp (layouts): Update. * gdb.tui/basic.exp: Update. diff --git a/gdb/testsuite/gdb.tui/empty.exp b/gdb/testsuite/gdb.tui/empty.exp index 861f564..d0d8270 100644 --- a/gdb/testsuite/gdb.tui/empty.exp +++ b/gdb/testsuite/gdb.tui/empty.exp @@ -32,28 +32,28 @@ if {![Term::enter_tui]} { # 4. List of boxes in 90x40 mode # 5. List of test name and text for the empty window set layouts { - {src src {{0 0 80 15}} {{0 0 90 23}} + {src src {{0 0 80 15}} {{0 0 90 26}} {{"no source" "No Source Available"}}} - {regs src-regs {{0 0 80 7} {0 6 80 9}} {{0 0 90 12} {0 11 90 14}} + {regs src-regs {{0 0 80 7} {0 6 80 9}} {{0 0 90 13} {0 12 90 13}} { {"no source" "No Source Available"} {"no regs" "Register Values Unavailable"} }} - {asm asm {{0 0 80 15}} {{0 0 90 23}} + {asm asm {{0 0 80 13}} {{0 0 90 26}} { {"no asm" "No Assembly Available"} }} - {regs asm-regs {{0 0 80 7} {0 6 80 9}} {{0 0 90 12} {0 11 90 14}} + {regs asm-regs {{0 0 80 7} {0 6 80 9}} {{0 0 90 13} {0 12 90 13}} { {"no asm" "No Assembly Available"} {"no regs" "Register Values Unavailable"} }} - {split split {{0 0 80 7} {0 6 80 9}} {{0 0 90 12} {0 11 90 14}} + {split split {{0 0 80 6} {0 5 80 8}} {{0 0 90 13} {0 12 90 13}} { {"no source" "No Source Available"} {"no asm" "No Assembly Available"} }} - {regs split-regs {{0 0 80 7} {0 6 80 9}} {{0 0 90 12} {0 11 90 14}} + {regs split-regs {{0 0 80 6} {0 5 80 8}} {{0 0 90 13} {0 12 90 13}} { {"no asm" "No Assembly Available"} {"no regs" "Register Values Unavailable"} diff --git a/gdb/testsuite/gdb.tui/resize.exp b/gdb/testsuite/gdb.tui/resize.exp index 3b885e1..c530279 100644 --- a/gdb/testsuite/gdb.tui/resize.exp +++ b/gdb/testsuite/gdb.tui/resize.exp @@ -37,4 +37,4 @@ if {![Term::enter_tui]} { Term::check_contents "source at startup" ">|21 *return 0" Term::resize 40 90 -Term::check_box "source box after resize" 0 0 90 23 +Term::check_box "source box after resize" 0 0 90 26 -- cgit v1.1