Mercurial > vim
diff src/screen.c @ 17438:967e2ee9b656 v8.1.1717
patch 8.1.1717: last char in menu popup window highlighted
commit https://github.com/vim/vim/commit/f914a33c9c8ec5c30da684a4a16edad3e0224f0a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 20 15:09:56 2019 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Jul 2019 15:15:05 +0200 |
parents | 45c1dc353321 |
children | a5874fdc8f3a |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -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 } }