aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-wingeneral.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-01-04 14:35:02 -0700
committerTom Tromey <tom@tromey.com>2020-01-11 12:24:03 -0700
commit7c392d1de1400202eb86f7679628c4b7c14f8108 (patch)
treeec0d6e501239764317bfeffd2020997254b70bec /gdb/tui/tui-wingeneral.c
parentef96a356b87730e05257297ad853ae4225c90c61 (diff)
downloadgdb-7c392d1de1400202eb86f7679628c4b7c14f8108.zip
gdb-7c392d1de1400202eb86f7679628c4b7c14f8108.tar.gz
gdb-7c392d1de1400202eb86f7679628c4b7c14f8108.tar.bz2
Make TUI borders respect "set style enabled"
When adding support for styling the TUI borders, I neglected to have this code check cli_styling. As a result, "set style enabled off" does not affect the borders. This patch fixes this oversight. While doing this, I found that running gdb without an executable, enabling the TUI, and then trying "set style enabled off" would fail with the mysterious "No registers". The fix for this is to use deprecated_safe_get_selected_frame in tui_source_window_base::refill. gdb/ChangeLog 2020-01-11 Tom Tromey <tom@tromey.com> * tui/tui-wingeneral.c (box_win): Check cli_styling. * tui/tui-winsource.c (tui_source_window_base::refill): Use deprecated_safe_get_selected_frame. Change-Id: I36acda25dd9014d994d366b4a0e8faee9d95d0f8
Diffstat (limited to 'gdb/tui/tui-wingeneral.c')
-rw-r--r--gdb/tui/tui-wingeneral.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index dae4255..0a9fc52 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -55,9 +55,10 @@ box_win (struct tui_win_info *win_info,
/* tui_apply_style resets the style entirely, so be sure to call it
before applying ATTRS. */
- tui_apply_style (win, (highlight_flag
- ? tui_active_border_style.style ()
- : tui_border_style.style ()));
+ if (cli_styling)
+ tui_apply_style (win, (highlight_flag
+ ? tui_active_border_style.style ()
+ : tui_border_style.style ()));
wattron (win, attrs);
#ifdef HAVE_WBORDER
wborder (win, tui_border_vline, tui_border_vline,