diff --git a/plover_console_ui/console_engine.py b/plover_console_ui/console_engine.py index cda6448..1ebd71a 100644 --- a/plover_console_ui/console_engine.py +++ b/plover_console_ui/console_engine.py @@ -24,7 +24,9 @@ def status_bar_text(engine) -> str: class ConsoleEngine(StenoEngine, Thread): - def __init__(self, config, keyboard_emulation, layout: ConsoleLayout, controller=None): + def __init__( + self, config, keyboard_emulation, layout: ConsoleLayout, controller=None + ): if controller: StenoEngine.__init__(self, config, controller, keyboard_emulation) else: @@ -41,6 +43,11 @@ def __init__(self, config, keyboard_emulation, layout: ConsoleLayout, controller self.hook_connect("add_translation", partial(layout.on_add_translation, self)) self.cmder = Commander(build_commands(self, layout), layout.output_to_console) + def on_output_changed(_): + get_app().invalidate() + + self.hook_connect("output_changed", on_output_changed) + def on_lookup(): focus_console() layout.cmder_input.text = ""