0
0
mirror of https://github.com/vim/vim.git synced 2025-10-22 08:34:29 -04:00

patch 9.1.1086: completion doesn't work with multi lines

Problem:  completion doesn't work with multi lines
          (Łukasz Jan Niemier)
Solution: handle linebreaks in completion code as expected
          (glepnir)

fixes: #2505
closes: #15373

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
glepnir
2025-02-08 19:04:51 +01:00
committed by Christian Brabandt
parent 746fe54d4f
commit 76bdb82527
15 changed files with 286 additions and 19 deletions

View File

@@ -1877,7 +1877,8 @@ win_line(
}
#endif
if ((State & MODE_INSERT) && in_curline && ins_compl_win_active(wp))
if ((State & MODE_INSERT) && ins_compl_win_active(wp)
&& (in_curline || ins_compl_lnum_in_range(lnum)))
area_highlighting = TRUE;
#ifdef FEAT_SYN_HL
@@ -2423,11 +2424,11 @@ win_line(
#endif
// Check if ComplMatchIns highlight is needed.
if ((State & MODE_INSERT) && in_curline
&& ins_compl_win_active(wp))
if ((State & MODE_INSERT) && ins_compl_win_active(wp)
&& (in_curline || ins_compl_lnum_in_range(lnum)))
{
int ins_match_attr =
ins_compl_col_range_attr((int)(ptr - line));
ins_compl_col_range_attr(lnum, (int)(ptr - line));
if (ins_match_attr > 0)
search_attr =
hl_combine_attr(search_attr, ins_match_attr);