I have a menu option that creates a file and at some point applies the syntax and colour schema to the file:
class ApplyFormatCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.active_view().settings().set("syntax", "Packages/xxx/xxx.sublime-syntax")
self.window.active_view().settings().set("color_scheme", "Packages/xxx/xxx.sublime-color-scheme")
The function works with no problem when called from the menu directly, on the opened file. But when called from my function that creates a file, it shows “Plain Text” on the right bottom while if I click on it the xxx syntax is “checked”. Is this a bug or do I need to refresh somehow?
This seems to only happening to me on Linux, not on Windows.