Compare commits

...

3 Commits

Author SHA1 Message Date
Alan Hamlett 54e6772a80 v11.0.8 2022-08-23 15:14:53 +02:00
Alan Hamlett b576dfafe6 changes for v11.0.8 2022-08-23 15:14:40 +02:00
Alan Hamlett 5299efd6fa sometimes selection object can have no elements but eval truthy 2022-08-23 15:13:44 +02:00
2 changed files with 9 additions and 2 deletions

View File

@ -3,6 +3,13 @@ History
-------
11.0.8 (2022-08-23)
++++++++++++++++++
- Bugfix to prevent using empty selection object.
`#116 <https://github.com/wakatime/sublime-wakatime/issues/116>`_
11.0.7 (2022-06-25)
++++++++++++++++++

View File

@ -8,7 +8,7 @@ Website: https://wakatime.com/
==========================================================="""
__version__ = '11.0.7'
__version__ = '11.0.8'
import sublime
@ -422,7 +422,7 @@ def append_heartbeat(entity, timestamp, is_write, view, project, folders):
'lines_in_file': view.rowcol(view.size())[0] + 1,
}
selections = view.sel()
if selections:
if selections and len(selections) > 0:
rowcol = view.rowcol(selections[0].begin())
row, col = rowcol[0] + 1, rowcol[1] + 1
heartbeat['lineno'] = row