mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 18:36:30 +00:00
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:
@@ -1044,11 +1044,13 @@ static bool pum_set_selected(int n, int repeat)
|
||||
// 'completeopt' contains "preview".
|
||||
// Skip this when tried twice already.
|
||||
// Skip this also when there is not much room.
|
||||
// Skip this for command-window when 'completeopt' contains "preview".
|
||||
// NOTE: Be very careful not to sync undo!
|
||||
if ((pum_array[pum_selected].pum_info != NULL)
|
||||
&& (Rows > 10)
|
||||
&& (repeat <= 1)
|
||||
&& (cur_cot_flags & (kOptCotFlagPreview | kOptCotFlagPopup))) {
|
||||
&& (cur_cot_flags & (kOptCotFlagPreview | kOptCotFlagPopup))
|
||||
&& !((cur_cot_flags & kOptCotFlagPreview) && cmdwin_type != 0)) {
|
||||
win_T *curwin_save = curwin;
|
||||
tabpage_T *curtab_save = curtab;
|
||||
|
||||
|
Reference in New Issue
Block a user