summaryrefslogtreecommitdiff
path: root/alot/commands.py
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-07-16 23:36:00 +0100
committerpazz <patricktotzke@gmail.com>2011-07-16 23:36:00 +0100
commit45bede005fd484de1db5875a3333403848fe869a (patch)
tree0f80ece2c0afb53df1612b0856d7429378199f68 /alot/commands.py
parent5c91af749d7b8971e877e279a1bba17e496d5bac (diff)
fix close in bufferlist
issue #49
Diffstat (limited to 'alot/commands.py')
-rw-r--r--alot/commands.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/alot/commands.py b/alot/commands.py
index 1d1b6769..acfb69a8 100644
--- a/alot/commands.py
+++ b/alot/commands.py
@@ -196,12 +196,15 @@ class BufferCloseCommand(Command):
close a buffer
@param buffer the selected buffer
"""
- def __init__(self, buffer=None, **kwargs):
+ def __init__(self, buffer=None, focussed=False, **kwargs):
self.buffer = buffer
+ self.focussed = focussed
Command.__init__(self, **kwargs)
def apply(self, ui):
- if not self.buffer:
+ if self.focussed:
+ self.buffer = ui.current_buffer.get_selected_buffer()
+ elif not self.buffer:
self.buffer = ui.current_buffer
ui.buffer_close(self.buffer)
ui.buffer_focus(ui.current_buffer)