If complete is case-sensitive and no completions exist the script crashes with the following: Lua error: @console.lua:1417: attempt to concatenate local 'prefix' (a nil value)
Unified · Split
| @@ -1184,7 +1184,7 @@ local function complete_match(part, list) · 1183 unmodified lines | |||
| 1184 | local prefix = find_common_prefix(completions) | 1184 | local prefix = find_common_prefix(completions) |
| 1185 | 1185 | ||
| 1186 | if opts.case_sensitive then | 1186 | if opts.case_sensitive then |
| 1187 | return completions, prefix | 1187 | return completions, prefix or part |
| 1188 | end | 1188 | end |
| 1189 | 1189 | ||
| 1190 | completions = {} | 1190 | completions = {} |