branch: externals/ivy-hydra
commit 1bf7f91f00bd90b9ffe8e3e8228a5df43e6d5122
Author: Hong Xu <[email protected]>
Commit: Oleh Krehel <[email protected]>
counsel.el (counsel--preselect-file): Do not pre-select URL.
Fixes #2302
---
counsel.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index 1a3f541..4c53657 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1948,7 +1948,8 @@ The preselect behavior can be customized via user options
(when counsel-find-file-at-point
(require 'ffap)
(let ((f (ffap-guesser)))
- (when f (expand-file-name f))))
+ (when (and f (not (ivy-ffap-url-p f)))
+ (expand-file-name f))))
(and counsel-preselect-current-file
buffer-file-name
(file-name-nondirectory buffer-file-name))))