Skip to content

Commit f96314a

Browse files
committed
Found correct file swith slash.
1 parent 47a59cf commit f96314a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ivy-file-preview.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ FN is the file path. POS can either be one of the following type:
259259
(when can-preview-p
260260
(setq ln (ignore-errors (cl-parse-integer ln))
261261
cl (ignore-errors (cl-parse-integer cl)))
262-
(when project-dir (setq fn (f-join project-dir fn)))
262+
(cond ((and (string-match-p "/" fn) project-dir)
263+
(setq fn (f-join project-dir fn)))
264+
(t (setq fn (f-join default-directory fn))))
263265
(ivy-file-preview--do-preview fn (if cl (cons ln cl) ln))))))
264266

265267
(defun ivy-file-preview--back-to-pos ()

0 commit comments

Comments
 (0)