Skip to content

Commit b221f99

Browse files
committed
Recentering window only if the command executed successfully instead of doing recentering in the 'preview'.
1 parent 696ca7d commit b221f99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

goto-line-preview.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ LINE-NUM : Target line number to navigate to."
8383
(let ((goto-line-preview-prev-buffer (buffer-name))
8484
(goto-line-preview-prev-line-num (line-number-at-pos)))
8585
(setq jumped (read-number "Goto line: ")))
86-
(unless jumped
86+
(if jumped
87+
(call-interactively #'recenter)
8788
(set-window-point window window-point)))))
8889

8990
;;;###autoload

0 commit comments

Comments
 (0)