Skip to content

Commit 14a8b43

Browse files
committed
fix(cmdline): improve state computation for "option" compltype
1 parent 43ec250 commit 14a8b43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/mini/cmdline.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ H.adjust_option_cmd_state = function(state)
678678
-- and try to expand complpat to match the whole word on cursor's left.
679679
if state.compltype == 'option' then return end
680680
state.complpat = state.line:sub(1, state.pos - 1):match(' (%w+)$') or ''
681-
state.compltype = state.complpat ~= nil and 'option' or state.compltype
681+
state.compltype = state.complpat ~= '' and 'option' or state.compltype
682682
end
683683

684684
-- Autocomplete ---------------------------------------------------------------

0 commit comments

Comments
 (0)