console.lua: fix crash if no completions exist
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)
This commit is contained in:
1 parent
ef026ffdb6
commit
75f252c47c
1 file changed
+1
-1
@@ -1184,7 +1184,7 @@ local function complete_match(part, list)
|
||||
local prefix = find_common_prefix(completions)
|
||||
|
||||
if opts.case_sensitive then
|
||||
return completions, prefix
|
||||
return completions, prefix or part
|
||||
end
|
||||
|
||||
completions = {}
|
||||
|
||||
Reference in new issue
Block a user