Sublime Forum

run_command() not running

#1

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?

0 Likes

#2

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.

0 Likes