From 4b6e3206b79ff1b91c76485a1a316ed2cba6d903 Mon Sep 17 00:00:00 2001 From: Ryan Sandridge Date: Mon, 23 Aug 2021 15:42:17 -0400 Subject: [PATCH] Fix OpenInNewWindowCommand Sublime now defaults to opening items in the same project window, which broke the functionality of OpenInNewWindowCommand. In order to force it to open in a new window, we need to pass the "-n" argument. --- SideBar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SideBar.py b/SideBar.py index 07b89b644..d815eed41 100644 --- a/SideBar.py +++ b/SideBar.py @@ -2636,11 +2636,12 @@ def run(self, paths=[]): executable_path = app_path + "Contents/SharedSupport/bin/subl" items.append(executable_path) + items.append("-n") for item in SideBarSelection(paths).getSelectedItems(): items.append(item.forCwdSystemPath()) items.append(item.path()) - subprocess.Popen(items, cwd=items[1]) + subprocess.Popen(items, cwd=items[2]) def is_visible(self, paths=[]): return not s.get("disabled_menuitem_open_in_new_window", False)