| To: vim-dev@vim.org |
| Subject: Patch 7.2.418 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.2.418 |
| Problem: Vim tries to set the background or foreground color in a terminal |
| to -1. (Graywh) Happens with ":hi Normal ctermbg=NONE". |
| Solution: When resetting the foreground or background color don't set the |
| color, let the clear screen code do that. |
| Files: src/syntax.c |
| |
| |
| |
| |
| |
| *** 7136,7142 **** |
| } |
| } |
| } |
| ! /* Add one to the argument, to avoid zero */ |
| if (key[5] == 'F') |
| { |
| HL_TABLE()[idx].sg_cterm_fg = color + 1; |
| --- 7136,7143 ---- |
| } |
| } |
| } |
| ! /* Add one to the argument, to avoid zero. Zero is used for |
| ! * "NONE", then "color" is -1. */ |
| if (key[5] == 'F') |
| { |
| HL_TABLE()[idx].sg_cterm_fg = color + 1; |
| |
| *** 7150,7156 **** |
| #endif |
| { |
| must_redraw = CLEAR; |
| ! if (termcap_active) |
| term_fg_color(color); |
| } |
| } |
| --- 7151,7157 ---- |
| #endif |
| { |
| must_redraw = CLEAR; |
| ! if (termcap_active && color >= 0) |
| term_fg_color(color); |
| } |
| } |
| |
| *** 7167,7182 **** |
| #endif |
| { |
| must_redraw = CLEAR; |
| ! if (termcap_active) |
| ! term_bg_color(color); |
| ! if (t_colors < 16) |
| ! i = (color == 0 || color == 4); |
| ! else |
| ! i = (color < 7 || color == 8); |
| ! /* Set the 'background' option if the value is wrong. */ |
| ! if (i != (*p_bg == 'd')) |
| ! set_option_value((char_u *)"bg", 0L, |
| ! i ? (char_u *)"dark" : (char_u *)"light", 0); |
| } |
| } |
| } |
| --- 7168,7188 ---- |
| #endif |
| { |
| must_redraw = CLEAR; |
| ! if (color >= 0) |
| ! { |
| ! if (termcap_active) |
| ! term_bg_color(color); |
| ! if (t_colors < 16) |
| ! i = (color == 0 || color == 4); |
| ! else |
| ! i = (color < 7 || color == 8); |
| ! /* Set the 'background' option if the value is |
| ! * wrong. */ |
| ! if (i != (*p_bg == 'd')) |
| ! set_option_value((char_u *)"bg", 0L, |
| ! i ? (char_u *)"dark" |
| ! : (char_u *)"light", 0); |
| ! } |
| } |
| } |
| } |
| |
| |
| |
| *** 683,684 **** |
| --- 683,686 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 418, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 30. Even though you died last week, you've managed to retain OPS on your |
| favorite IRC channel. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |