diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-23 20:48:59 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-07-17 12:18:51 -0600 |
commit | 00e264e7626260a6df6b5a0aa7ee25215ea93f9c (patch) | |
tree | 503733e9caf5f26a5751b24c988058b50a93aa15 | |
parent | 06210ce428ad74c28fd94f7ea3800b79791cdefa (diff) | |
download | binutils-00e264e7626260a6df6b5a0aa7ee25215ea93f9c.zip binutils-00e264e7626260a6df6b5a0aa7ee25215ea93f9c.tar.gz binutils-00e264e7626260a6df6b5a0aa7ee25215ea93f9c.tar.bz2 |
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 <tom@tromey.com>
* tui/tui-wingeneral.c
(tui_check_and_display_highlight_if_needed): Check can_highlight.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/tui/tui-wingeneral.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 28b0b53..0648d37 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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. (struct tui_cmd_window) <can_scroll>: New method. * tui/tui-command.c (tui_dispatch_ctrl_char): Use can_scroll diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index cf8d9fc..c15739c 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); |