Check can_highlight in tui_check_and_display_highlight_if_needed
authorTom Tromey <tom@tromey.com>
Mon, 24 Jun 2019 02:48:59 +0000 (20:48 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:18:51 +0000 (12:18 -0600)
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  <tom@tromey.com>

* tui/tui-wingeneral.c
(tui_check_and_display_highlight_if_needed): Check can_highlight.

gdb/ChangeLog
gdb/tui/tui-wingeneral.c

index 28b0b5334c0adb32970e3130c37d88d98fb3b99f..0648d3767cbcc602a865490e3bb8464dcc9c68c3 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-17  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-wingeneral.c
+       (tui_check_and_display_highlight_if_needed): Check can_highlight.
+
 2019-07-17  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-data.h (struct tui_win_info) <can_scroll>: New method.
index cf8d9fc395937df63d317c0c38a3c94f0d4ffde4..c15739c594bff0bbd01b989c87353bee6e35a218 100644 (file)
@@ -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);