diff options
Diffstat (limited to 'alot/commands/bufferlist.py')
-rw-r--r-- | alot/commands/bufferlist.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/alot/commands/bufferlist.py b/alot/commands/bufferlist.py index c638f8a0..ef58c6fc 100644 --- a/alot/commands/bufferlist.py +++ b/alot/commands/bufferlist.py @@ -21,7 +21,11 @@ class BufferCloseCommand(Command): def apply(self, ui): bufferlist = ui.current_buffer selected = bufferlist.get_selected_buffer() - ui.apply_command(globals.BufferCloseCommand(buffer=selected)) - if bufferlist is not selected: - bufferlist.rebuild() - ui.update() + d = ui.apply_command(globals.BufferCloseCommand(buffer=selected)) + + def cb(ignoreme): + if bufferlist is not selected: + bufferlist.rebuild() + ui.update() + d.addCallback(cb) + return d |