emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 5e29e41 003/173: company-files--grab-existing-name: Check


From: Dmitry Gutov
Subject: [elpa] master 5e29e41 003/173: company-files--grab-existing-name: Check if the file is remote
Date: Thu, 23 Jun 2016 00:28:33 +0000 (UTC)

branch: master
commit 5e29e41929f3adc801508271c3082b71b902949a
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    company-files--grab-existing-name: Check if the file is remote
    
    Only continue if the connection is already established.
    
    Fixes #301
---
 company-files.el |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/company-files.el b/company-files.el
index 7cfc500..e44b4f5 100644
--- a/company-files.el
+++ b/company-files.el
@@ -1,6 +1,6 @@
 ;;; company-files.el --- company-mode completion back-end for file paths
 
-;; Copyright (C) 2009-2011, 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2014-2015  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -50,6 +50,8 @@
     (and (cl-dolist (regexp company-files--regexps)
            (when (setq file (company-grab-line regexp 1))
              (cl-return file)))
+         (or (not (file-remote-p file))
+             (file-remote-p file nil t))
          (setq dir (file-name-directory file))
          (not (string-match "//" dir))
          (file-exists-p dir)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]