Skip to content

Commit

Permalink
Release 1.0.4 Fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
James Zhang committed May 2, 2014
1 parent 7dc6043 commit 6d303c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions auto_save.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ class AutoSaveListener(sublime_plugin.EventListener):
def on_modified(self, view):
settings = sublime.load_settings(settings_filename)
delay = settings.get(delay_field)



'''
Must use this callback for ST2 compatibility
'''
def callback():
view.run_command("save")


'''
If the queue is longer than 1, pop the last item off,
Otherwise save and reset the queue.
Expand All @@ -35,7 +40,6 @@ def debounce_save():
if len(AutoSaveListener.save_queue) > 1:
AutoSaveListener.save_queue.pop()
else:
# view.run_command("save")
sublime.set_timeout(callback, 0)
AutoSaveListener.save_queue = []

Expand Down
1 change: 1 addition & 0 deletions messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
"1.0.1": "messages/1.0.1.txt",
"1.0.2": "messages/1.0.2.txt",
"1.0.3": "messages/1.0.3.txt",
"1.0.4": "messages/1.0.4.txt"
}
4 changes: 4 additions & 0 deletions messages/1.0.4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fixes:

* Fixed bug where plugin was broken for ST2.
* Thanks for reporting the issue and fixing it https://github.com/mateuszjarzewski

0 comments on commit 6d303c4

Please sign in to comment.