From: Ian Dunn Date: Fri, 11 Mar 2016 18:46:57 +0000 (-0500) Subject: Correctly expand the file name at point X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/d4253924a7b78f150111645831165239509a4a76 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 --- 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))