From 66db6ce02196c381131dc71d2482b24bcef8445e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 6 Sep 2022 19:38:08 +0800 Subject: [PATCH] fix #1490 --- changelog.md | 1 + script/core/rangeformatting.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index b0632a91b..5486dff0b 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,7 @@ * `CHG` `document-symbol`: redesigned to better support for `Sticky Scroll` feature of VSCode * `FIX` `diagnostics.workspaceDelay` can not prevent first workspace diagnostic * `FIX` [#1476](https://github.com/sumneko/lua-language-server/issues/1476) +* `FIX` [#1490](https://github.com/sumneko/lua-language-server/issues/1490) * `FIX` [#1493](https://github.com/sumneko/lua-language-server/issues/1493) * `FIX` [#1499](https://github.com/sumneko/lua-language-server/issues/1499) * `FIX` [#1526](https://github.com/sumneko/lua-language-server/issues/1526) diff --git a/script/core/rangeformatting.lua b/script/core/rangeformatting.lua index 04a61bd98..d9b4db8aa 100644 --- a/script/core/rangeformatting.lua +++ b/script/core/rangeformatting.lua @@ -22,7 +22,7 @@ return function(uri, range, options) return { { start = converter.unpackPosition(uri, { line = startLine, character = 0 }), - finish = converter.unpackPosition(uri, { line = endLine + 1, character = 0 }), + finish = converter.unpackPosition(uri, { line = endLine, character = 999999 }), text = formattedText, } }