So in ST4, if we close an “Untitled” tab without any text, then the save change prompt
will not show up.
However, if that “Untitled” tab has text or the name of the tab is something else, then the previous prompt will show up.
I am trying to create a eventlistner to disable the save prompt when the tab name is “Query Result”.
class closeFile(sublime_plugin.EventListener):
def on_close(self, view):
print("Run")
if "Query Result" in view.name():
print("Closed")
view.close()
I created something like this, looks it runs when I close the file, but it will not close directly without show the save prompt
I also try the on_pre_close, it still doesn’t work…
Any thought on this? Thank y’all so much !