Mercurial > vim
comparison src/screen.c @ 17628:6146b10714de v8.1.1811
patch 8.1.1811: popup window color cannot be set to "Normal"
commit https://github.com/vim/vim/commit/c363fe1599655232e8bd6e279fbf70d4c1b7baf6
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 4 18:13:46 2019 +0200
patch 8.1.1811: popup window color cannot be set to "Normal"
Problem: Popup window color cannot be set to "Normal".
Solution: Check for non-empty 'wincolor' instead of zero attribute.
(closes #4772)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Aug 2019 18:15:05 +0200 |
parents | 8cca2654d459 |
children | 03dcb660c4e8 |
comparison
equal
deleted
inserted
replaced
17627:cb9dd669cb7d | 17628:6146b10714de |
---|---|
993 int wcr_attr = 0; | 993 int wcr_attr = 0; |
994 | 994 |
995 if (*wp->w_p_wcr != NUL) | 995 if (*wp->w_p_wcr != NUL) |
996 wcr_attr = syn_name2attr(wp->w_p_wcr); | 996 wcr_attr = syn_name2attr(wp->w_p_wcr); |
997 #ifdef FEAT_TEXT_PROP | 997 #ifdef FEAT_TEXT_PROP |
998 if (WIN_IS_POPUP(wp) && wcr_attr == 0) | 998 else if (WIN_IS_POPUP(wp)) |
999 wcr_attr = HL_ATTR(HLF_PNI); | 999 wcr_attr = HL_ATTR(HLF_PNI); |
1000 #endif | 1000 #endif |
1001 return wcr_attr; | 1001 return wcr_attr; |
1002 } | 1002 } |
1003 | 1003 |
9208 return retval; | 9208 return retval; |
9209 | 9209 |
9210 /* | 9210 /* |
9211 * If there is a next window or a status line, we first try to delete the | 9211 * If there is a next window or a status line, we first try to delete the |
9212 * lines at the bottom to avoid messing what is after the window. | 9212 * lines at the bottom to avoid messing what is after the window. |
9213 * If this fails and there are following windows, don't do anything to avoid | 9213 * If this fails and there are following windows, don't do anything to |
9214 * messing up those windows, better just redraw. | 9214 * avoid messing up those windows, better just redraw. |
9215 */ | 9215 */ |
9216 did_delete = FALSE; | 9216 did_delete = FALSE; |
9217 if (wp->w_next != NULL || wp->w_status_height) | 9217 if (wp->w_next != NULL || wp->w_status_height) |
9218 { | 9218 { |
9219 if (screen_del_lines(0, W_WINROW(wp) + wp->w_height - line_count, | 9219 if (screen_del_lines(0, W_WINROW(wp) + wp->w_height - line_count, |
9239 } | 9239 } |
9240 | 9240 |
9241 if (screen_ins_lines(0, W_WINROW(wp) + row, line_count, (int)Rows, 0, NULL) | 9241 if (screen_ins_lines(0, W_WINROW(wp) + row, line_count, (int)Rows, 0, NULL) |
9242 == FAIL) | 9242 == FAIL) |
9243 { | 9243 { |
9244 /* deletion will have messed up other windows */ | 9244 // deletion will have messed up other windows |
9245 if (did_delete) | 9245 if (did_delete) |
9246 { | 9246 { |
9247 wp->w_redr_status = TRUE; | 9247 wp->w_redr_status = TRUE; |
9248 win_rest_invalid(W_NEXT(wp)); | 9248 win_rest_invalid(W_NEXT(wp)); |
9249 } | 9249 } |