diff options
author | Dimitrios Semitsoglou-Tsiapos <kmhzsem@gmx.com> | 2016-11-13 15:39:22 +0200 |
---|---|---|
committer | Dimitrios Semitsoglou-Tsiapos <kmhzsem@gmx.com> | 2016-11-13 15:41:58 +0200 |
commit | 3e5738bacba2fe250529a97045f48dfc3861dc83 (patch) | |
tree | dbf6ef76d187e7b72976bc127a98d46c6809a7e4 /alot/ui.py | |
parent | 1b4abe0b3c70457044c3ddaab7f023c415a3f889 (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.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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() |