Skip to content

Commit fdda44a

Browse files
committed
Fixed virtual buffer.
1 parent e09e50e commit fdda44a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ivy-file-preview.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"Open the file path (FN).
7979
POS can either be an integer or cons cell represent line number and columns."
8080
(setq ivy-file-preview--selected-file fn)
81-
(find-file fn)
81+
(if (file-exists-p fn) (find-file fn) (switch-to-buffer fn))
8282
(cond ((consp pos)
8383
(ivy-file-preview--goto-line (car pos))
8484
(move-to-column (cdr pos)))

0 commit comments

Comments
 (0)