Skip to content

Commit 329e6a2

Browse files
committed
fix missing command in sidebar context menu
in that case paths are passed, but there might not be a view
1 parent 73e8d51 commit 329e6a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Terminal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ def open_terminal(self, dir, terminal, parameters):
168168

169169

170170
class OpenTerminalCommand(sublime_plugin.WindowCommand, TerminalCommand):
171-
def is_visible(self):
171+
def is_visible(self, paths=[]):
172172
# remove the command if the view doesn't have a path to open at
173173
# taking is_visible over is_enabled to remove it from the context menu,
174174
# instead of simply disabling the entry
175175
view = self.window.active_view()
176-
return bool(view and view.file_name())
176+
return bool(view and view.file_name() or paths)
177177

178178
def run(self, paths=[], parameters=None, terminal=None):
179179
path = self.get_path(paths)

0 commit comments

Comments
 (0)