Updated the code to make sure it supports newer versions of Beau.

This commit is contained in:
David Diaz 2018-04-30 19:37:23 -06:00
parent e47c52c998
commit 8b18de7d89
1 changed files with 5 additions and 2 deletions

View File

@ -41,7 +41,7 @@ class BeauCommand(sublime_plugin.TextCommand):
return return
self.inThread( self.inThread(
[self.path, '-c', active_view.file_name(), 'list', '--no-format'], [self.path, 'list', '-c', active_view.file_name(), '--no-format'],
self.listFetched self.listFetched
) )
@ -96,11 +96,14 @@ class BeauCommand(sublime_plugin.TextCommand):
results_view.set_syntax_file(SYNTAX) results_view.set_syntax_file(SYNTAX)
self.inThread( self.inThread(
[self.path, '-c', active_view.file_name(), 'request', alias, '--no-format'], [self.path, 'request', alias,'-c', active_view.file_name(), '--no-format'],
onComplete=handleResult onComplete=handleResult
) )
def autoindent(self, obj): def autoindent(self, obj):
if not obj.strip():
return 'Empty';
parsed = json.loads(obj) parsed = json.loads(obj)
return json.dumps( return json.dumps(
parsed, parsed,