I wrote the following plugin
import sublime
import sublime_plugin
class ExampleListener(sublime_plugin.EventListener):
def on_text_command(self, view, command_name, args):
print("window_on_text_command")
def on_modified(self, view):
print("window_on_modified")
class ExampleViewListener(sublime_plugin.ViewEventListener):
def on_text_command(self, command_name, args):
print("view_on_text_command")
def on_modified(self):
print("view_on_modified")
moving the cursor yields the following output
view_on_text_command
window_on_text_command
typing “a” yields the following output
window_on_modified
view_on_modified
but, If the tab is a duplicate of the clone_file command, the output will look like this.
moving the cursor:
window_on_text_command
typing “a”:
window_on_modified
view_on_modified
window_on_modified <- (I think this is because there are two tabs duplicated)
Is it a specification that on_text_command is not called when tabbed by clone_file command? Or is it a bug?