Home Download Buy Blog Forum Support

run_command() not running

run_command() not running

Postby Rablador on Sat Mar 16, 2013 12:59 pm

Hi!

In ST2 this worked every time (in a callback from show_quick_panel()):
sublime.active_window().run_command(cmd, args)

However, in ST3 it only works for some commands. For example, hiding the side bar works fine, but auto-completion does not. My plugin extends ApplicationCommand, so could that be it?
Rablador
 
Posts: 10
Joined: Mon Dec 24, 2012 11:53 pm

Re: run_command() not running

Postby Rablador on Sat Mar 16, 2013 5:10 pm

So, as it turned out, in ST3 you have to actually differentiate the command you are passing to run_command(). Using sublime.active_window().active_view().run_command() works as intended to text commands such as auto_complete.
Rablador
 
Posts: 10
Joined: Mon Dec 24, 2012 11:53 pm


Return to Plugin Development

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest