diff --git a/lsp-mode.el b/lsp-mode.el index a372f39132..027e3a8177 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -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)