summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2013-08-09 15:15:17 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2013-08-09 15:15:17 +0100
commit6c38a4f785e48a04445685fe618d5665ba440d8a (patch)
treee7d449385a0c718efe8991f41b28dac5fe875518 /alot
parent66d24cf0f00a58133c159940d8f65a4f622a09eb (diff)
redraw the UI afer focus [last|first] commands
If one replaces some widget without letting urwid know, one has to manually trigger it to redraw the screen. We enforce this to happen after focus_first and focus_last commands, which might replace widgets in search buffers. For sake of performance this is *not* done after all other focus movements.
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/globals.py2
-rw-r--r--alot/commands/search.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index 5a31c275..03c9aaa6 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -857,9 +857,11 @@ class MoveCommand(Command):
elif self.movement == 'first':
if hasattr(ui.current_buffer, "focus_first"):
ui.current_buffer.focus_first()
+ ui.update()
elif self.movement == 'last':
if hasattr(ui.current_buffer, "focus_last"):
ui.current_buffer.focus_last()
+ ui.update()
else:
ui.notify('unknown movement: ' + self.movement,
priority='error')
diff --git a/alot/commands/search.py b/alot/commands/search.py
index b5fac4bc..c37d1af5 100644
--- a/alot/commands/search.py
+++ b/alot/commands/search.py
@@ -250,5 +250,6 @@ class MoveFocusCommand(MoveCommand):
logging.debug(self.movement)
if self.movement == 'last':
ui.current_buffer.focus_last()
+ ui.update()
else:
MoveCommand.apply(self, ui)