From 97ec2481d6c1f17fce340fdfbc141eed11ad250e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 17 May 2021 19:16:19 +0200 Subject: buffers/thread: prevent cursor movements from switching sub-window focus --- alot/buffers/thread.py | 4 ++++ 1 file changed, 4 insertions(+) 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() -- cgit v1.2.3