mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
lsp: Support change events with no range
range is optional https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent
This commit is contained in:
parent
039d88ab45
commit
f7aa7d0be2
1 changed files with 3 additions and 0 deletions
|
@ -51,6 +51,9 @@ class OpenFile:
|
||||||
|
|
||||||
def apply_changes(self, changes):
|
def apply_changes(self, changes):
|
||||||
for change in changes:
|
for change in changes:
|
||||||
|
if "range" not in change:
|
||||||
|
self.text = change["text"]
|
||||||
|
continue
|
||||||
start = utils.pos_to_idx(
|
start = utils.pos_to_idx(
|
||||||
change["range"]["start"]["line"],
|
change["range"]["start"]["line"],
|
||||||
change["range"]["start"]["character"],
|
change["range"]["start"]["character"],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue