Added a validation for when the quick panel is cancelled.

This commit is contained in:
David Diaz 2017-10-21 01:24:49 -06:00
parent 2e78664c55
commit 87cecce263
1 changed files with 3 additions and 2 deletions

View File

@ -51,12 +51,13 @@ class BeauCommand(sublime_plugin.TextCommand):
self.requests.append([method, alias, endpoint])
requests.append([title, description])
proc.wait()
active_window.show_quick_panel(requests, self.on_done)
def on_done(self, index):
if index == -1:
return
active_window = sublime.active_window()
active_view = active_window.active_view()