Skip to content

Commit

Permalink
Release 1.0.3: Fix toggle on/off bug
Browse files Browse the repository at this point in the history
  • Loading branch information
James Zhang committed Apr 30, 2014
1 parent 933ff67 commit 471958d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 2 additions & 6 deletions auto_save.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ def on_modified(self, view):
settings = sublime.load_settings(settings_filename)
delay = settings.get(delay_field)

AutoSaveListener.save_queue.append(0) # Append to queue for every on_modified event.


'''
If the queue is longer than 1, pop the last item off,
Expand All @@ -39,11 +37,9 @@ def debounce_save():
AutoSaveListener.save_queue = []


'''
Debounce save by the specified delay.
'''
if settings.get(on_modified_field) and view.file_name():
Timer(delay, debounce_save).start()
AutoSaveListener.save_queue.append(0) # Append to queue for every on_modified event.
Timer(delay, debounce_save).start() # Debounce save by the specified delay.


class AutoSaveCommand(sublime_plugin.TextCommand):
Expand Down
5 changes: 3 additions & 2 deletions messages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"install": "messages/install.txt",
"1.0.1": "messages/1.0.1.txt",
"1.0.2": "messages/1.0.2.txt"
}
"1.0.2": "messages/1.0.2.txt",
"1.0.3": "messages/1.0.3.txt",
}
4 changes: 4 additions & 0 deletions messages/1.0.3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fixes:

* Fixed bug where turning on/off resulted in plugin breaking.
* Thanks for reporting the issue, https://github.com/fertingoff

0 comments on commit 471958d

Please sign in to comment.