From: NeilBrown Date: Fri, 21 Jul 2023 08:43:30 +0000 (+1000) Subject: notmuch: focus on query pane when changing messages X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=24c5535900cc8ab0debedd269ed83eb9af900e3b;p=edlib.git notmuch: focus on query pane when changing messages The previous patch didn't fix this properly. 'K-a' wasn't handled for examine. Try again. Fixes: 5707b369a802 ("notmuch: when moving among messages, set focus to query pane.") Signed-off-by: NeilBrown --- diff --git a/DOC/TODO.md b/DOC/TODO.md index 190d72b3..e702b1bc 100644 --- a/DOC/TODO.md +++ b/DOC/TODO.md @@ -28,7 +28,7 @@ the file. - [X] visiting a new file from a 44 popup is weird. - [X] search in history always finds a new history line. It doesn't check if new patterns still matches this line. -- [ ] in notmuch cursor should go to query result when changing +- [X] in notmuch cursor should go to query result when changing messages. - [ ] menu for address completions in email-compose diff --git a/python/module-notmuch.py b/python/module-notmuch.py index fa229a48..4609d144 100644 --- a/python/module-notmuch.py +++ b/python/module-notmuch.py @@ -2038,8 +2038,6 @@ class notmuch_master_view(edlib.Pane): m = p.call("doc:dup-point", 0, edlib.MARK_UNGROUPED, ret='mark') p.call("notmuch:select", m, direction) - if self.query_pane: - self.query_pane.take_focus() return 1 def handle_j(self, key, focus, **a): @@ -3055,6 +3053,7 @@ class notmuch_query_view(edlib.Pane): focus.call("notmuch:select-message", s2, s) self.selmsg = s2 self.call("view:changed") + self.take_focus() return 1 def handle_reposition(self, key, focus, mark, mark2, **a):