aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-winsource.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-03-08 13:41:55 -0700
committerTom Tromey <tromey@adacore.com>2019-03-14 05:47:10 -0600
commit6f11e6824e15bd40fe1e7b245a22865c6ef8c7bd (patch)
treec4ba703384d8adcb73a5231d1d07563d44213957 /gdb/tui/tui-winsource.h
parenta0148d8416f6c692b83acc77cf838b3e7929a249 (diff)
downloadgdb-6f11e6824e15bd40fe1e7b245a22865c6ef8c7bd.zip
gdb-6f11e6824e15bd40fe1e7b245a22865c6ef8c7bd.tar.gz
gdb-6f11e6824e15bd40fe1e7b245a22865c6ef8c7bd.tar.bz2
Make TUI react to "set style enabled"
When the user toggles "set style enabled", the TUI should react by redrawing the source window, if necessary. This patch implements this behavior. No test because the TUI is generally not tested. This version of the patch incorporates Pedro's patch to provide a clean way to force the TUI to update the source window's contents. gdb/ChangeLog 2019-03-14 Pedro Alves <palves@redhat.com> Tom Tromey <tromey@adacore.com> * tui/tui-winsource.h (tui_refill_source_window): Declare. * tui/tui-winsource.c (tui_refill_source_window): New function, from... (tui_horizontal_source_scroll): ... here. Move some logic. * cli/cli-style.c (set_style_enabled): Notify new observable. * tui/tui-hooks.c (tui_redisplay_source): New function. (tui_attach_detach_observers): Attach or detach tui_redisplay_source. * observable.h (source_styling_changed): New observable. * observable.c: Define source_styling_changed observable.
Diffstat (limited to 'gdb/tui/tui-winsource.h')
-rw-r--r--gdb/tui/tui-winsource.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index db33a4f..920032b 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -56,6 +56,7 @@ extern void tui_show_source_content (struct tui_win_info *);
extern void tui_horizontal_source_scroll (struct tui_win_info *,
enum tui_scroll_direction,
int);
+extern void tui_refill_source_window (struct tui_win_info *);
extern enum tui_status tui_set_exec_info_content (struct tui_win_info *);
extern void tui_show_exec_info_content (struct tui_win_info *);
extern void tui_erase_exec_info_content (struct tui_win_info *);