mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
send current cursor line number to wakatime cli
This commit is contained in:
parent
3c4ceb95fa
commit
762027644f
@ -207,6 +207,7 @@ class SendHeartbeatThread(threading.Thread):
|
|||||||
self.api_key = SETTINGS.get('api_key', '')
|
self.api_key = SETTINGS.get('api_key', '')
|
||||||
self.ignore = SETTINGS.get('ignore', [])
|
self.ignore = SETTINGS.get('ignore', [])
|
||||||
self.last_heartbeat = LAST_HEARTBEAT.copy()
|
self.last_heartbeat = LAST_HEARTBEAT.copy()
|
||||||
|
self.lineno = view.sel()[0].begin() if view.sel() else None
|
||||||
self.view = view
|
self.view = view
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
@ -236,6 +237,8 @@ class SendHeartbeatThread(threading.Thread):
|
|||||||
project_name = find_project_from_folders(self.folders, self.target_file)
|
project_name = find_project_from_folders(self.folders, self.target_file)
|
||||||
if project_name:
|
if project_name:
|
||||||
cmd.extend(['--project', project_name])
|
cmd.extend(['--project', project_name])
|
||||||
|
if self.lineno is not None:
|
||||||
|
cmd.extend(['--lineno', self.lineno])
|
||||||
for pattern in self.ignore:
|
for pattern in self.ignore:
|
||||||
cmd.extend(['--ignore', pattern])
|
cmd.extend(['--ignore', pattern])
|
||||||
if self.debug:
|
if self.debug:
|
||||||
|
Loading…
Reference in New Issue
Block a user