commit 0e66ba861919eaa7a01bac0ec984b862ce8e929f parent 050dbf30aeda1b0f57fbce84a1d682ae256e1514 Author: andsy10 <andsy1016@gmail.com> Date: Wed, 21 Oct 2026 02:12:02 +0800 Switch to target buffer before consult--jump Diffstat:
| M | consult-symbol.el | | | 12 | ++++++------ |
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/consult-symbol.el b/consult-symbol.el @@ -123,13 +123,13 @@ source cannot be located are not previewed." (xref-push-marker-stack) (pcase-let ((`(,buf . ,pos) (find-function-search-for-symbol sym type file))) + (switch-to-buffer buf) (consult--jump - (with-current-buffer buf - (save-excursion - (save-restriction - (widen) - (goto-char (or pos (point-min))) - (point-marker)))))) + (save-excursion + (save-restriction + (widen) + (goto-char (or pos (point-min))) + (point-marker))))) (run-hooks 'find-function-after-hook)))) ;;;###autoload