comparison 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
comparison
equal deleted inserted replaced
17437:5f71f12bdb8c 17438:967e2ee9b656
3217 #ifdef FEAT_SYN_HL 3217 #ifdef FEAT_SYN_HL
3218 int vcol_save_attr = 0; /* saved attr for 'cursorcolumn' */ 3218 int vcol_save_attr = 0; /* saved attr for 'cursorcolumn' */
3219 int syntax_attr = 0; /* attributes desired by syntax */ 3219 int syntax_attr = 0; /* attributes desired by syntax */
3220 int has_syntax = FALSE; /* this buffer has syntax highl. */ 3220 int has_syntax = FALSE; /* this buffer has syntax highl. */
3221 int save_did_emsg; 3221 int save_did_emsg;
3222 int eol_hl_off = 0; /* 1 if highlighted char after EOL */
3223 int draw_color_col = FALSE; /* highlight colorcolumn */ 3222 int draw_color_col = FALSE; /* highlight colorcolumn */
3224 int *color_cols = NULL; /* pointer to according columns array */ 3223 int *color_cols = NULL; /* pointer to according columns array */
3225 #endif 3224 #endif
3225 int eol_hl_off = 0; /* 1 if highlighted char after EOL */
3226 #ifdef FEAT_TEXT_PROP 3226 #ifdef FEAT_TEXT_PROP
3227 int text_prop_count; 3227 int text_prop_count;
3228 int text_prop_next = 0; // next text property to use 3228 int text_prop_next = 0; // next text property to use
3229 textprop_T *text_props = NULL; 3229 textprop_T *text_props = NULL;
3230 int *text_prop_idxs = NULL; 3230 int *text_prop_idxs = NULL;
5555 } 5555 }
5556 5556
5557 /* 5557 /*
5558 * At end of the text line or just after the last character. 5558 * At end of the text line or just after the last character.
5559 */ 5559 */
5560 if (c == NUL 5560 if ((c == NUL
5561 #if defined(LINE_ATTR) 5561 #if defined(LINE_ATTR)
5562 || did_line_attr == 1 5562 || did_line_attr == 1
5563 #endif 5563 #endif
5564 ) 5564 ) && eol_hl_off == 0)
5565 { 5565 {
5566 #ifdef FEAT_SEARCH_EXTRA 5566 #ifdef FEAT_SEARCH_EXTRA
5567 long prevcol = (long)(ptr - line) - (c == NUL); 5567 long prevcol = (long)(ptr - line) - (c == NUL);
5568 5568
5569 /* we're not really at that column when skipping some text */ 5569 /* we're not really at that column when skipping some text */
5685 { 5685 {
5686 ++col; 5686 ++col;
5687 ++off; 5687 ++off;
5688 } 5688 }
5689 ++vcol; 5689 ++vcol;
5690 #ifdef FEAT_SYN_HL
5691 eol_hl_off = 1; 5690 eol_hl_off = 1;
5692 #endif
5693 } 5691 }
5694 } 5692 }
5695 5693
5696 /* 5694 /*
5697 * At end of the text line. 5695 * At end of the text line.