mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-08 17:51:42 +01:00
notmuch-hello: Preserve current position when invoking notmuch-hello
Previously, we preserved the current position only when returning to the notmuch-hello buffer or when refreshing it. Fix to also preserve the position when directly invoking notmuch-hello, (such as from a global keybinding).
This commit is contained in:
parent
3ac2727dae
commit
7fa6306cae
1 changed files with 159 additions and 156 deletions
|
@ -194,20 +194,23 @@ diagonal."
|
|||
(defun notmuch-hello-update (&optional no-display)
|
||||
;; Lazy - rebuild everything.
|
||||
(interactive)
|
||||
(let ((target (if (widget-at)
|
||||
(widget-value (widget-at))
|
||||
(progn
|
||||
(widget-forward 1)
|
||||
(widget-value (widget-at))))))
|
||||
(notmuch-hello no-display target)))
|
||||
(notmuch-hello no-display))
|
||||
|
||||
(defun notmuch-hello (&optional no-display target)
|
||||
(defun notmuch-hello (&optional no-display)
|
||||
(interactive)
|
||||
|
||||
(if no-display
|
||||
(set-buffer "*notmuch-hello*")
|
||||
(switch-to-buffer "*notmuch-hello*"))
|
||||
|
||||
(let ((target (if (widget-at)
|
||||
(widget-value (widget-at))
|
||||
(condition-case nil
|
||||
(progn
|
||||
(widget-forward 1)
|
||||
(widget-value (widget-at)))
|
||||
(error nil)))))
|
||||
|
||||
(kill-all-local-variables)
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer))
|
||||
|
@ -368,7 +371,7 @@ diagonal."
|
|||
|
||||
(goto-char final-target-pos)
|
||||
(if (not (widget-at))
|
||||
(widget-forward 1))))
|
||||
(widget-forward 1)))))
|
||||
|
||||
;;
|
||||
|
||||
|
|
Loading…
Reference in a new issue