diff --git a/clients/urwid/main.py b/clients/urwid/main.py index 28e1287..85077f9 100644 --- a/clients/urwid/main.py +++ b/clients/urwid/main.py @@ -1695,6 +1695,12 @@ class App(object): self.window_split=True self.switch_editor() + def repaint_screen(self): + """ + Force urwid to repaint the whole screen. + """ + self.loop.screen.clear() + class MessageBody(urwid.Text): """ @@ -2052,7 +2058,7 @@ class ExternalEditor(urwid.Terminal): if keyl == "ctrl l": # always do this, and also pass it to the terminal - wipe_screen() + app.repaint_screen() elif key == app.prefs["edit_escapes"]["abort"]: self.terminate() @@ -2130,7 +2136,7 @@ class OptionsMenu(urwid.LineBox): return self.keypress(size, "enter") elif keyl == "ctrl l": - wipe_screen() + app.repaint_screen() def mouse_event(self, size, event, button, x, y, focus): @@ -2186,7 +2192,7 @@ class ActionBox(urwid.ListBox): self.change_focus(size, 0) elif key == "ctrl l": - wipe_screen() + app.repaint_screen() elif keyl == "o": app.options_menu() @@ -2550,16 +2556,6 @@ def ignore(*_, **__): pass -def wipe_screen(*_): - """ - A crude hack to repaint the whole screen. I didnt immediately - see anything to acheive this in the MainLoop methods so this - will do, I suppose. - """ - app.loop.stop() - call("clear") - app.loop.start() - # XxX_N0_4rgP4rs3_XxX ###yoloswag def get_arg(key, default=None, get_value=True): try: