diff --git a/anaconda_lib/helpers.py b/anaconda_lib/helpers.py index e0ec1cce..4bf799cb 100644 --- a/anaconda_lib/helpers.py +++ b/anaconda_lib/helpers.py @@ -250,15 +250,29 @@ def get_settings(view, name, default=None): break # stop loop r = view.settings().get(name, plugin_settings.get(name, default)) - if name == 'python_interpreter' or name == 'extra_paths': - w = view.window() - if w is not None: - r = sublime.expand_variables(r, w.extract_variables()) - r = os.path.expanduser(os.path.expandvars(r)) + if name == 'python_interpreter': + r = expand(view, r) + elif name == 'extra_paths': + if isinstance(r, (list, tuple)): + r = [expand(view, e) for e in r] + else: + r = expand(view, r) return r +def expand(view, path): + """Expand the given path + """ + + window = view.window() + if window is not None: + tmp = sublime.expand_variables(path, window.extract_variables()) + tmp = os.path.expanduser(os.path.expandvars(tmp)) + + return tmp + + def active_view(): """Return the active view """ diff --git a/messages.json b/messages.json index bcbf4343..56a617ab 100644 --- a/messages.json +++ b/messages.json @@ -72,5 +72,6 @@ "2.1.19": "messages/2.1.19.txt", "2.1.20": "messages/2.1.20.txt", "2.1.21": "messages/2.1.21.txt", - "2.1.22": "messages/2.1.22.txt" + "2.1.22": "messages/2.1.22.txt", + "2.1.23": "messages/2.1.23.txt" } diff --git a/messages/2.1.23.txt b/messages/2.1.23.txt new file mode 100644 index 00000000..ea0243a4 --- /dev/null +++ b/messages/2.1.23.txt @@ -0,0 +1,15 @@ + + | + _` | __ \ _` | __| _ \ __ \ _` | _` | + ( | | | ( | ( ( | | | ( | ( | + \__,_| _| _| \__,_| \___| \___/ _| _| \__,_| \__,_| + The Sublime Text 3 Python IDE + + +Anaconda v2.1.23 +================ + +Welcome to new anaconda v2.1.23, what can yo find in this minor release? + +## Fixes + - Fixed bug introduced in the v2.1.22 \ No newline at end of file