Don't unnecessarily create two view instances
@@ -47,8 +47,9 @@ def get_common_parent(paths):
def create_path_dict(x):
abs_dict = {}
for vid in x:
- if sublime.View(vid).file_name():
- abs_dict[vid] = sublime.View(vid).file_name()
+ view = sublime.View(vid)
+ if view.file_name():
+ abs_dict[vid] = view.file_name()
else:
abs_dict[vid] = "untitled"
