mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
lsp: Fix semantic token positions
This commit is contained in:
parent
aac834e1c5
commit
6bae860326
1 changed files with 4 additions and 4 deletions
|
@ -102,10 +102,10 @@ class OpenFile:
|
||||||
]
|
]
|
||||||
|
|
||||||
# convert line, column numbers to deltas
|
# convert line, column numbers to deltas
|
||||||
for i, token_list in enumerate(token_lists[1:]):
|
for a, b in zip(token_lists[-2::-1], token_lists[:0:-1]):
|
||||||
token_list[0] -= token_lists[i][0]
|
b[0] -= a[0]
|
||||||
if token_list[0] == 0:
|
if b[0] == 0:
|
||||||
token_list[1] -= token_lists[i][1]
|
b[1] -= a[1]
|
||||||
|
|
||||||
# flatten the list
|
# flatten the list
|
||||||
return [x for y in token_lists for x in y]
|
return [x for y in token_lists for x in y]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue