vim-patch:9.1.1554: crash when omni-completion opens command-line window

Problem:  Vim crashes during omnifunc completion inside the command-line
          window ("q:") if the completion item attempts to open an "info"
          preview window. This leads to a failed assert during execution.
Solution: Avoid opening preview windows while inside the command-line
          window to prevent the crash (Girish Palya).

closes: vim/vim#17764

e4fdb1e4e7

Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
zeertzjq
2025-07-17 06:41:41 +08:00
parent a08d6a8ac1
commit 436ae1d23e
3 changed files with 21 additions and 3 deletions

View File

@@ -1,7 +1,10 @@
if exists('s:did_load')
" Align Nvim defaults to Vim.
set commentstring=/*\ %s\ */
set complete=.,w,b,u,t,i
if g:testname !~ 'test_ins_complete_no_halt\.vim$'
set complete=.,w,b,u,t,i
set completeopt=menu,preview
endif
set define=^\\s*#\\s*define
set diffopt=internal,filler,closeoff,inline:simple
set directory^=.
@@ -32,7 +35,7 @@ if exists('s:did_load')
if has('win32')
set isfname+=:
endif
if g:testname !~ 'test_mapping.vim$'
if g:testname !~ 'test_mapping\.vim$'
" Make "Q" switch to Ex mode.
" This does not work for all tests as Nvim only supports Vim Ex mode.
nnoremap Q gQ<Cmd>call<SID>ExStart()<CR>