From: Tom Tromey Date: Mon, 24 Jun 2019 02:48:59 +0000 (-0600) Subject: Check can_highlight in tui_check_and_display_highlight_if_needed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=00e264e7626260a6df6b5a0aa7ee25215ea93f9c;p=binutils-gdb.git Check can_highlight in tui_check_and_display_highlight_if_needed tui_check_and_display_highlight_if_needed currently checks the window's type; but this can be replaced with a check of "can_highlight", making it more polymorphically-correct. gdb/ChangeLog 2019-07-17 Tom Tromey * tui/tui-wingeneral.c (tui_check_and_display_highlight_if_needed): Check can_highlight. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 28b0b5334c0..0648d3767cb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-07-17 Tom Tromey + + * tui/tui-wingeneral.c + (tui_check_and_display_highlight_if_needed): Check can_highlight. + 2019-07-17 Tom Tromey * tui/tui-data.h (struct tui_win_info) : New method. diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index cf8d9fc3959..c15739c594b 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -128,7 +128,7 @@ tui_highlight_win (struct tui_win_info *win_info) void tui_check_and_display_highlight_if_needed (struct tui_win_info *win_info) { - if (win_info != NULL && win_info->type != CMD_WIN) + if (win_info != NULL && win_info->can_highlight) { if (win_info->is_highlighted) tui_highlight_win (win_info);