summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md2
-rw-r--r--script/parser/luadoc.lua2
2 files changed, 3 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index cf7fad9a..5fede5aa 100644
--- a/changelog.md
+++ b/changelog.md
@@ -6,12 +6,14 @@
* `FIX` [#2062]
* `FIX` [#2083]
* `FIX` [#2088]
+* `FIX` [#2110]
[#2038]: https://github.com/LuaLS/lua-language-server/issues/2038
[#2042]: https://github.com/LuaLS/lua-language-server/issues/2042
[#2062]: https://github.com/LuaLS/lua-language-server/issues/2062
[#2083]: https://github.com/LuaLS/lua-language-server/issues/2083
[#2088]: https://github.com/LuaLS/lua-language-server/issues/2088
+[#2110]: https://github.com/LuaLS/lua-language-server/issues/2110
## 3.6.21
`2023-5-24`
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index c022adcb..e251aa3e 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -1534,7 +1534,7 @@ local function buildLuaDoc(comment)
parseTokens(doc, startOffset + startPos)
local result, rests = convertTokens(doc)
if result then
- result.range = comment.finish
+ result.range = math.max(comment.finish, result.finish)
local finish = result.firstFinish or result.finish
if rests then
for _, rest in ipairs(rests) do