       (pcase-let* ((`(,fname ,line ,offset)
                     (cl-etypecase def-loc
                       (string `(,def-loc ,1 ,(point-min)))
-                      (fstar-location `(,(fstar-location-filename def-loc)
+                      (fstar-location `(,(fstar-location-remote-filename def-loc)
                                    ,(fstar-location-line-from def-loc)
                                    ,(fstar-location-beg-offset def-loc))))))
         (funcall callback (if (string= fname "<input>")

  "Remove OVERLAY."
  (delete-overlay overlay))

(defun fstar-subp--related-location-help-string ()
  "Build a string describing motion commands for related locations."
  (substitute-command-keys
   "\\[fstar-jump-to-related-error] to visit, \\[pop-global-mark] to come back"))

(defun fstar-subp--help-echo-for-alt-locs (locs)
  "Prepare a string describing LOCS and how to browse to them."

    fn-or-v))

(defun fstar--remote-p ()
  "Check if current buffer is remote.
Return a file name prefix if so, and nil otherwise."
  (file-remote-p (or buffer-file-name default-directory)))

(defun fstar--maybe-cygpath (path)
  "Translate PATH using Cygpath if appropriate."
  (if (and (eq system-type 'cygwin) (not (fstar--remote-p)))
      (string-trim-right (car (process-lines "cygpath" "-w" path)))
    path))

(defun fstar--hide-buffer (buf)
  "Hide window displaying BUF, if any.
