From fa46121121a2a88040cb3fcdd8dc4d4df6b016dd Mon Sep 17 00:00:00 2001 From: JSDurand Date: Mon, 6 Dec 2021 13:43:09 +0800 Subject: view-conf: fix cursor when moving paragraphs. * view-conf.el (durand-scroll-next-paragraph): Fix cursor when moving paragraphs, so that the cursor stays at the top of the window. --- view-conf.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'view-conf.el') diff --git a/view-conf.el b/view-conf.el index 5c832e4..69f52a5 100644 --- a/view-conf.el +++ b/view-conf.el @@ -280,7 +280,8 @@ options to choose from." (forward-line -1)) (setq arg (1+ arg))))) (setq pos (point))) - (set-window-start (selected-window) pos))) + (set-window-start (selected-window) pos) + (goto-char pos))) ;;;###autoload (defun durand-scroll-prev-paragraph (&optional arg) -- cgit v1.2.3-18-g5258