mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 21:34:46 +08:00
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.
This commit is contained in:
@ -228,6 +228,10 @@ extern observable<struct frame_info *, int> register_changed;
|
||||
frame has changed. */
|
||||
extern observable<user_selected_what> user_selected_context_changed;
|
||||
|
||||
/* This is notified when the source styling setting has changed and
|
||||
should be reconsulted. */
|
||||
extern observable<> source_styling_changed;
|
||||
|
||||
} /* namespace observers */
|
||||
|
||||
} /* namespace gdb */
|
||||
|
Reference in New Issue
Block a user