vim-patch:9.1.1518: getcompletiontype() may crash (#34819)

Problem:  getcompletiontype() crashes when no completion is available
          (after v9.1.1509).
Solution: Don't call set_expand_context() (zeertzjq)

fixes: vim/vim#17681
closes: vim/vim#17684

e2c0f81dd0
This commit is contained in:
zeertzjq
2025-07-07 06:46:05 +08:00
committed by GitHub
parent 2e2ac49c57
commit 6fd2a3040f
7 changed files with 53 additions and 43 deletions

View File

@ -3002,8 +3002,8 @@ function vim.fn.getcmdcomplpat() end
--- |getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|.
--- Returns an empty string when completion is not defined.
---
--- To get the type of the command-line completion for the
--- specified string, use |getcompletiontype()|.
--- To get the type of the command-line completion for a specified
--- string, use |getcompletiontype()|.
---
--- @return string
function vim.fn.getcmdcompltype() end