mirror of
https://github.com/vim/vim.git
synced 2025-10-22 08:34:29 -04:00
patch 9.1.0956: completion may crash, completion highlight wrong with preview window
Problem: completion may crash, completion highlight wrong with preview window (after v9.1.0954) Solution: correctly calculate scroll offset, check for preview window when adding extra highlighting (glepnir) when there have a preview window prepare_tagpreview will change curwin to preview window and this may cause ComplMatchIns check condition not correct. check wp is curwin and also the type of wp is not a preview or poup info fixes: #16284 closes: #16283 Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f07c10d7bb
commit
8d0bb6dc9f
@@ -1869,7 +1869,7 @@ win_line(
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((State & MODE_INSERT) && in_curline && ins_compl_active())
|
||||
if ((State & MODE_INSERT) && in_curline && ins_compl_win_active(wp))
|
||||
area_highlighting = TRUE;
|
||||
|
||||
#ifdef FEAT_SYN_HL
|
||||
@@ -2415,7 +2415,8 @@ win_line(
|
||||
#endif
|
||||
|
||||
// Check if ComplMatchIns highlight is needed.
|
||||
if ((State & MODE_INSERT) && in_curline && ins_compl_active())
|
||||
if ((State & MODE_INSERT) && in_curline
|
||||
&& ins_compl_win_active(wp))
|
||||
{
|
||||
int ins_match_attr =
|
||||
ins_compl_col_range_attr((int)(ptr - line));
|
||||
|
Reference in New Issue
Block a user