summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-05-17 19:16:19 +0200
committerAnton Khirnov <anton@khirnov.net>2021-05-17 19:16:19 +0200
commit97ec2481d6c1f17fce340fdfbc141eed11ad250e (patch)
treeb506f517258be4e1628d3b0cfcc39f93880ff4da
parentb9eda0c9541c652735f1dc4b8cab024c7a940d7e (diff)
buffers/thread: prevent cursor movements from switching sub-window focus
-rw-r--r--alot/buffers/thread.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/alot/buffers/thread.py b/alot/buffers/thread.py
index 744eab22..567d98f8 100644
--- a/alot/buffers/thread.py
+++ b/alot/buffers/thread.py
@@ -76,6 +76,10 @@ class ThreadBuffer(Buffer):
('weight', 0.5, cur_msg_deco),
])
+ # clear the command map to prevent cursor movements from switching focus
+ self.body._command_map = self.body._command_map.copy()
+ self.body._command_map._command = {}
+
urwid.connect_signal(self._msgtree_widget.body, "modified", self._update_cur_msg)
self.rebuild()