From d4253924a7b78f150111645831165239509a4a76 Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Fri, 11 Mar 2016 13:46:57 -0500 Subject: [PATCH] Correctly expand the file name at point * counsel.el (counsel-find-file): Use expand-file-name after getting a file name at point. Fixes #430 --- counsel.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/counsel.el b/counsel.el index 935a0d5b3..96e82f83c 100644 --- a/counsel.el +++ b/counsel.el @@ -1114,7 +1114,8 @@ When INITIAL-INPUT is non-nil, use it in the minibuffer during completion." (find-file (expand-file-name x ivy--directory)))) :preselect (when counsel-find-file-at-point (require 'ffap) - (ffap-guesser)) + (let ((f (ffap-guesser))) + (when f (expand-file-name f)))) :require-match 'confirm-after-completion :history 'file-name-history :keymap counsel-find-file-map)) -- 2.39.2