From 5e29e41929f3adc801508271c3082b71b902949a Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Thu, 12 Feb 2015 15:34:48 +0200 Subject: [PATCH] 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 7cfc50075..e44b4f5bd 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) -- 2.39.2