mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 02:46:31 +00:00
vim-patch:9.1.1086: completion doesn't work with multi lines (#32377)
Problem: completion doesn't work with multi lines
(Łukasz Jan Niemier)
Solution: handle linebreaks in completion code as expected
(glepnir)
fixes: vim/vim#2505
closes: vim/vim#15373
76bdb82527
This commit is contained in:
@@ -1539,7 +1539,8 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, s
|
||||
ptr = line + v; // "line" may have been updated
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1787,8 +1788,9 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, s
|
||||
}
|
||||
|
||||
// Check if ComplMatchIns highlight is needed.
|
||||
if ((State & MODE_INSERT) && in_curline && ins_compl_win_active(wp)) {
|
||||
int ins_match_attr = ins_compl_col_range_attr((int)(ptr - line));
|
||||
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(lnum, (int)(ptr - line));
|
||||
if (ins_match_attr > 0) {
|
||||
search_attr = hl_combine_attr(search_attr, ins_match_attr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user