summaryrefslogtreecommitdiffstats
path: root/tests/lsp_tests/lsp_tutil.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 20:17:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 20:17:18 +0000
commitd1ef412a1bd37c5498a9f1670f14e15621879cd6 (patch)
treea631a70b631b2105cd2996d6072267f49cd26225 /tests/lsp_tests/lsp_tutil.py
parentReleasing progress-linux version 0.1.25-0.0~progress7.99u1. (diff)
downloaddebputy-d1ef412a1bd37c5498a9f1670f14e15621879cd6.tar.xz
debputy-d1ef412a1bd37c5498a9f1670f14e15621879cd6.zip
Merging upstream version 0.1.26.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/lsp_tests/lsp_tutil.py')
-rw-r--r--tests/lsp_tests/lsp_tutil.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/lsp_tests/lsp_tutil.py b/tests/lsp_tests/lsp_tutil.py
index 1e509af..2873f72 100644
--- a/tests/lsp_tests/lsp_tutil.py
+++ b/tests/lsp_tests/lsp_tutil.py
@@ -30,10 +30,12 @@ def put_doc_with_cursor(
uri: str,
language_id: str,
content: str,
- *,
- doc_version: int = 1,
) -> "Position":
cleaned_content, cursor_pos = _locate_cursor(content)
+ doc_version = 1
+ existing = ls.workspace.text_documents.get(uri)
+ if existing is not None:
+ doc_version = existing.version + 1
ls.workspace.put_text_document(
TextDocumentItem(
uri,