mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
using on_modified event instead of more frequent on_selection_modified event
This commit is contained in:
parent
e1fc5926cf
commit
9d21626459
@ -5,7 +5,7 @@ Maintainer: WakaTi.me <support@wakatime.com>
|
|||||||
Website: https://www.wakati.me/
|
Website: https://www.wakati.me/
|
||||||
==========================================================="""
|
==========================================================="""
|
||||||
|
|
||||||
__version__ = '0.2.3'
|
__version__ = '0.2.4'
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
@ -61,6 +61,7 @@ def api(targetFile, timestamp, isWrite=False, endtime=None):
|
|||||||
cmd.append('--write')
|
cmd.append('--write')
|
||||||
if endtime:
|
if endtime:
|
||||||
cmd.extend(['--endtime', str('%f' % endtime)])
|
cmd.extend(['--endtime', str('%f' % endtime)])
|
||||||
|
#print(cmd)
|
||||||
Popen(cmd)
|
Popen(cmd)
|
||||||
LAST_ACTION = timestamp
|
LAST_ACTION = timestamp
|
||||||
if endtime and endtime > LAST_ACTION:
|
if endtime and endtime > LAST_ACTION:
|
||||||
@ -147,6 +148,6 @@ class WakatimeListener(sublime_plugin.EventListener):
|
|||||||
def on_activated(self, view):
|
def on_activated(self, view):
|
||||||
handle_normal_action(view)
|
handle_normal_action(view)
|
||||||
|
|
||||||
def on_selection_modified(self, view):
|
def on_modified(self, view):
|
||||||
handle_normal_action(view)
|
handle_normal_action(view)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user