branch: externals/consult
commit 8d0e5a547dec6cde5111f1a314ba7ccccc22af21
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
consult--jump-1: Minor cleanup
---
consult.el | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/consult.el b/consult.el
index 2d12e71a8f..d7810962bf 100644
--- a/consult.el
+++ b/consult.el
@@ -1263,19 +1263,17 @@ See `isearch-open-necessary-overlays' and
`isearch-open-overlay-temporary'."
(defun consult--jump-1 (pos)
"Go to POS and recenter."
- (cond
- ((and (markerp pos) (not (marker-buffer pos)))
- ;; Only print a message, no error in order to not mess
- ;; with the minibuffer update hook.
- (message "Buffer is dead"))
- (t
+ (if (and (markerp pos) (not (marker-buffer pos)))
+ ;; Only print a message, no error in order to not mess
+ ;; with the minibuffer update hook.
+ (message "Buffer is dead")
;; Switch to buffer if it is not visible
(when (and (markerp pos) (not (eq (current-buffer) (marker-buffer pos))))
(consult--buffer-action (marker-buffer pos) 'norecord))
;; Widen if we cannot jump to the position (idea from
flycheck-jump-to-error)
(unless (= (goto-char pos) (point))
(widen)
- (goto-char pos)))))
+ (goto-char pos))))
(defun consult--jump (pos)
"Push current position to mark ring, go to POS and recenter."