only send heartbeats for the currently active buffer, for cases where another process modifies files which are open in sublime text
This commit is contained in:
parent
23c5801080
commit
acaad2dc83
1 changed files with 4 additions and 2 deletions
|
@ -288,10 +288,12 @@ class WakatimeListener(sublime_plugin.EventListener):
|
||||||
handle_heartbeat(view, is_write=True)
|
handle_heartbeat(view, is_write=True)
|
||||||
|
|
||||||
def on_selection_modified(self, view):
|
def on_selection_modified(self, view):
|
||||||
handle_heartbeat(view)
|
if sublime.active_window().active_view().buffer_id() == view.buffer_id():
|
||||||
|
handle_heartbeat(view)
|
||||||
|
|
||||||
def on_modified(self, view):
|
def on_modified(self, view):
|
||||||
handle_heartbeat(view)
|
if sublime.active_window().active_view().buffer_id() == view.buffer_id():
|
||||||
|
handle_heartbeat(view)
|
||||||
|
|
||||||
|
|
||||||
class WakatimeDashboardCommand(sublime_plugin.ApplicationCommand):
|
class WakatimeDashboardCommand(sublime_plugin.ApplicationCommand):
|
||||||
|
|
Loading…
Reference in a new issue