]> git.notmuchmail.org Git - notmuch/commit
notmuch-show-imenu-prev-index-position-function: Don't recenter
authorDamien Cassou <damien@cassou.me>
Sun, 16 Feb 2025 21:22:23 +0000 (22:22 +0100)
committerDavid Bremner <david@tethera.net>
Tue, 18 Feb 2025 12:54:36 +0000 (08:54 -0400)
commit0e10ca3a625c25c0238ecca2767aab7035b88a22
tree9b5455e169a74efc49a81973bb9f92f1d8add1cc
parent9c1f6cf746725af7bbbb66e746c5d694723ac0eb
notmuch-show-imenu-prev-index-position-function: Don't recenter

The previous version of
notmuch-show-imenu-prev-index-position-function was calling
notmuch-show-previous-message which was recentering the window. This
is a problem when which-func-mode is active because which-func-mode is
called each time the user moves point around.

Because this function is only meant to be executed by imenu, there is
no reason to recenter the window. For the same reason, the new
implementation doesn't have to follow strictly how
notmuch-show-previous-message is implemented because imenu only places
point at very specific locations before calling
notmuch-show-imenu-prev-index-position-function.
emacs/notmuch-show.el