0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.1.1717: last char in menu popup window highlighted

Problem:    Last char in menu popup window highlighted.
Solution:   Do not highlight an extra character twice.
This commit is contained in:
Bram Moolenaar
2019-07-20 15:09:56 +02:00
parent ab0a789808
commit f914a33c9c
4 changed files with 84 additions and 5 deletions

View File

@@ -3219,10 +3219,10 @@ win_line(
int syntax_attr = 0; /* attributes desired by syntax */
int has_syntax = FALSE; /* this buffer has syntax highl. */
int save_did_emsg;
int eol_hl_off = 0; /* 1 if highlighted char after EOL */
int draw_color_col = FALSE; /* highlight colorcolumn */
int *color_cols = NULL; /* pointer to according columns array */
#endif
int eol_hl_off = 0; /* 1 if highlighted char after EOL */
#ifdef FEAT_TEXT_PROP
int text_prop_count;
int text_prop_next = 0; // next text property to use
@@ -5557,11 +5557,11 @@ win_line(
/*
* At end of the text line or just after the last character.
*/
if (c == NUL
if ((c == NUL
#if defined(LINE_ATTR)
|| did_line_attr == 1
#endif
)
) && eol_hl_off == 0)
{
#ifdef FEAT_SEARCH_EXTRA
long prevcol = (long)(ptr - line) - (c == NUL);
@@ -5687,9 +5687,7 @@ win_line(
++off;
}
++vcol;
#ifdef FEAT_SYN_HL
eol_hl_off = 1;
#endif
}
}