Skip to content

Commit

Permalink
fix: use xref-make-match instead of xref-make (emacs-lsp#4453)
Browse files Browse the repository at this point in the history
This allows us to use xref-query-replace-in-results since it needs
xref-match-length to be defined.
  • Loading branch information
JasZhe authored and cheerio-pixel committed May 29, 2024
1 parent 1e4df9f commit e2f8159
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -5159,11 +5159,12 @@ identifier and the position respectively."
(max (min end-char len) 0)
'xref-match t line)
;; LINE is nil when FILENAME is not being current visited by any buffer.
(xref-make (or line filename)
(xref-make-match (or line filename)
(xref-make-file-location
filename
(lsp-translate-line (1+ start-line))
(lsp-translate-column start-char)))))
(lsp-translate-column start-char))
(- end-char start-char))))

(defun lsp--location-uri (loc)
(if (lsp-location? loc)
Expand Down

0 comments on commit e2f8159

Please sign in to comment.