From 4b6840b31a15c9bae8d00652eee252ab0b7ab427 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 22:17:17 +0200 Subject: Adding upstream version 0.1.26. Signed-off-by: Daniel Baumann --- tests/lsp_tests/lsp_tutil.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/lsp_tests/lsp_tutil.py') 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, -- cgit v1.2.3