branch: elpa/javelin
commit eb9b0831dcfce2e6a9765d21d13e839c856f6c2f
Author: Otávio Schwanck dos Santos <[email protected]>
Commit: Otávio Schwanck dos Santos <[email protected]>

    improve when file is nil
---
 harpoon.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/harpoon.el b/harpoon.el
index 2dfccb8cf7d..5e8342c5dd0 100644
--- a/harpoon.el
+++ b/harpoon.el
@@ -169,7 +169,7 @@
   (let ((result (completing-read "Harpoon to file: "
                                  (delete (s-replace-regexp 
(projectile-project-p) "" (or (buffer-file-name) ""))
                                          (delete "" (split-string 
(harpoon--get-file-text) "\n"))))))
-    (when result
+    (when (and result (file-exists-p result) (not (string-equal result "")))
       (find-file (concat (projectile-project-p) result)))))
 
 (define-derived-mode harpoon-mode nil "Harpoon"

Reply via email to