Skip to content

Commit 2092eeb

Browse files
authored
Merge branch 'master' into max-fields-count
2 parents 27c074d + 0b067fd commit 2092eeb

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

3rd/json.lua

Submodule json.lua updated 1 file

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
<!-- Add all new changes here. They will be moved under a version at release -->
55
* `NEW` Added `completion.maxFieldCount` which lets you increase the amount of fields to analyze before requiring more specific input
66

7+
## 3.16.1
8+
`2025-12-8`
9+
* `FIX` Broken in Linux
10+
* `FIX` Fix diagnostic completions incorrect textEdit.finish
11+
* `FIX` Comparison crash in doc export CLI [#3111](https://github.com/LuaLS/lua-language-server/issues/3111)
12+
713
## 3.16.0
814
`2025-12-2`
915
* `NEW` Support Lua 5.5

script/cli/doc/export.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ function export.positionOf(rowcol)
7272
end
7373

7474
function export.sortDoc(a,b)
75-
if a.name ~= b.name then
75+
if a.name and b.name and a.name ~= b.name then
7676
return a.name < b.name
7777
end
7878

79-
if a.file ~= b.file then
79+
if a.file and b.file and a.file ~= b.file then
8080
return a.file < b.file
8181
end
8282

script/core/completion/completion.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,7 @@ local function tryluaDocBySource(state, position, source, results)
19261926
kind = define.CompletionItemKind.Enum,
19271927
textEdit = {
19281928
start = source.start,
1929-
finish = source.start + #source.mode - 1,
1929+
finish = source.start + #source.mode,
19301930
newText = mode,
19311931
},
19321932
}
@@ -1941,7 +1941,7 @@ local function tryluaDocBySource(state, position, source, results)
19411941
kind = define.CompletionItemKind.Value,
19421942
textEdit = {
19431943
start = source.start,
1944-
finish = source.start + #source[1] - 1,
1944+
finish = source.start + #source[1],
19451945
newText = name,
19461946
},
19471947
}

0 commit comments

Comments
 (0)