]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix search in remote project with relative file names
authorDmitry Gutov <dmitry@gutov.dev>
Thu, 16 May 2024 22:05:17 +0000 (01:05 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 18 May 2024 18:51:56 +0000 (20:51 +0200)
(cherry picked from commit 113bd2082c982df933df9b12c3994d6d582c8268)

lisp/progmodes/xref.el

index 3b3318afc659519cc1d685da9fe24af75095c713..df95e517a4027ebe0da3861652b65eaf8c5f03fb 100644 (file)
@@ -2242,7 +2242,10 @@ Such as the current syntax table and the applied syntax properties."
 (defun xref--convert-hits (hits regexp)
   (let (xref--last-file-buffer
         (tmp-buffer (generate-new-buffer " *xref-temp*"))
-        (xref--hits-remote-id (file-remote-p default-directory))
+        (xref--hits-remote-id (if (file-name-absolute-p (cadar hits))
+                                  ;; TODO: Add some test for this.
+                                  (file-remote-p default-directory)
+                                default-directory))
         (syntax-needed (xref--regexp-syntax-dependent-p regexp)))
     (unwind-protect
         (mapcan (lambda (hit)