From 9401fe6fd20884e3f2b7d18b3e7f2dbf1d301730 Mon Sep 17 00:00:00 2001 From: codedokode Date: Tue, 18 Nov 2014 14:13:39 +0300 Subject: [PATCH] Update autofilename.py When using 'afn_use_keybinding' = true option the autocomplete popup still is opened inside any string and it is quite distracting. I have tried to fix this, though I am not sure if it is okay to query settings value on every modification. --- autofilename.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autofilename.py b/autofilename.py index 952687f..60ba8a7 100644 --- a/autofilename.py +++ b/autofilename.py @@ -168,6 +168,11 @@ def on_modified(self, view): def on_selection_modified_async(self,view): if not view.window(): return + + # Do not open autocomplete automatically if keybinding mode is used + if not FileNameComplete.is_active and self.get_setting('afn_use_keybinding', view): + return + sel = view.sel()[0] if sel.empty() and self.at_path_end(view): scope_contents = view.substr(view.extract_scope(sel.a-1))