diff --git a/autofilename.py b/autofilename.py index c348db8..f0dd5d4 100644 --- a/autofilename.py +++ b/autofilename.py @@ -62,7 +62,7 @@ class FileNameComplete(sublime_plugin.EventListener): return self.get_setting('afn_insert_dimensions',view) == operand if key == "afn_deleting_slash": sel = view.sel()[0] - valid = sel.empty() and view.substr(sel.a-1) == '/' + valid = self.at_path_end(view) and sel.empty() and view.substr(sel.a-1) == '/' return valid == operand def at_path_end(self,view):