summaryrefslogtreecommitdiff
path: root/alot/ui.py
diff options
context:
space:
mode:
authorDimitrios Semitsoglou-Tsiapos <kmhzsem@gmx.com>2016-11-13 15:39:22 +0200
committerDimitrios Semitsoglou-Tsiapos <kmhzsem@gmx.com>2016-11-13 15:41:58 +0200
commit3e5738bacba2fe250529a97045f48dfc3861dc83 (patch)
treedbf6ef76d187e7b72976bc127a98d46c6809a7e4 /alot/ui.py
parent1b4abe0b3c70457044c3ddaab7f023c415a3f889 (diff)
ui: Only update via SIGINT1 when in search buffer
Refreshing non-search buffers (eg the thread view) can have undesired effects. This defensively only refreshes when the search buffer is visible. (fixes #871) Signed-off-by: Dimitrios Semitsoglou-Tsiapos <kmhzsem@gmx.com>
Diffstat (limited to 'alot/ui.py')
-rw-r--r--alot/ui.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/alot/ui.py b/alot/ui.py
index 2f46aa8a..88a0785a 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -7,7 +7,7 @@ import signal
from twisted.internet import reactor, defer
from settings import settings
-from buffers import BufferlistBuffer
+from buffers import BufferlistBuffer, SearchBuffer
from commands import globals
from commands import commandfactory
from commands import CommandCanceled
@@ -656,6 +656,7 @@ class UI(object):
if signum == signal.SIGINT:
logging.info('shut down cleanly')
self.apply_command(globals.ExitCommand())
- self.current_buffer.rebuild()
- self.update()
-
+ elif signum == signal.SIGUSR1:
+ if isinstance(self.current_buffer, SearchBuffer):
+ self.current_buffer.rebuild()
+ self.update()