From 1c5bef9d76697bf52398a243ac5f790778fe1d6b Mon Sep 17 00:00:00 2001 From: Tito Bouzout Date: Sat, 17 Mar 2012 19:15:09 -0300 Subject: [PATCH] Fix for scopes with new lines --- autofilename.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autofilename.py b/autofilename.py index 22d6e3f..febd35f 100644 --- a/autofilename.py +++ b/autofilename.py @@ -24,7 +24,7 @@ class FileNameComplete(sublime_plugin.EventListener): this_dir = os.path.split(view.file_name())[0] + os.path.sep - cur_path = view.substr(view.extract_scope(sel-1)) + cur_path = view.substr(view.extract_scope(sel-1)).replace('\r\n', '\n').split('\n')[0] if cur_path.startswith(("'","\"")): cur_path = cur_path[1:-1]