1 To: [email protected] |
|
2 Subject: Patch 7.2.418 |
|
3 Fcc: outbox |
|
4 From: Bram Moolenaar <[email protected]> |
|
5 Mime-Version: 1.0 |
|
6 Content-Type: text/plain; charset=UTF-8 |
|
7 Content-Transfer-Encoding: 8bit |
|
8 ------------ |
|
9 |
|
10 Patch 7.2.418 |
|
11 Problem: Vim tries to set the background or foreground color in a terminal |
|
12 to -1. (Graywh) Happens with ":hi Normal ctermbg=NONE". |
|
13 Solution: When resetting the foreground or background color don't set the |
|
14 color, let the clear screen code do that. |
|
15 Files: src/syntax.c |
|
16 |
|
17 |
|
18 *** ../vim-7.2.417/src/syntax.c 2010-03-23 14:39:07.000000000 +0100 |
|
19 --- src/syntax.c 2010-05-13 15:34:27.000000000 +0200 |
|
20 *************** |
|
21 *** 7136,7142 **** |
|
22 } |
|
23 } |
|
24 } |
|
25 ! /* Add one to the argument, to avoid zero */ |
|
26 if (key[5] == 'F') |
|
27 { |
|
28 HL_TABLE()[idx].sg_cterm_fg = color + 1; |
|
29 --- 7136,7143 ---- |
|
30 } |
|
31 } |
|
32 } |
|
33 ! /* Add one to the argument, to avoid zero. Zero is used for |
|
34 ! * "NONE", then "color" is -1. */ |
|
35 if (key[5] == 'F') |
|
36 { |
|
37 HL_TABLE()[idx].sg_cterm_fg = color + 1; |
|
38 *************** |
|
39 *** 7150,7156 **** |
|
40 #endif |
|
41 { |
|
42 must_redraw = CLEAR; |
|
43 ! if (termcap_active) |
|
44 term_fg_color(color); |
|
45 } |
|
46 } |
|
47 --- 7151,7157 ---- |
|
48 #endif |
|
49 { |
|
50 must_redraw = CLEAR; |
|
51 ! if (termcap_active && color >= 0) |
|
52 term_fg_color(color); |
|
53 } |
|
54 } |
|
55 *************** |
|
56 *** 7167,7182 **** |
|
57 #endif |
|
58 { |
|
59 must_redraw = CLEAR; |
|
60 ! if (termcap_active) |
|
61 ! term_bg_color(color); |
|
62 ! if (t_colors < 16) |
|
63 ! i = (color == 0 || color == 4); |
|
64 ! else |
|
65 ! i = (color < 7 || color == 8); |
|
66 ! /* Set the 'background' option if the value is wrong. */ |
|
67 ! if (i != (*p_bg == 'd')) |
|
68 ! set_option_value((char_u *)"bg", 0L, |
|
69 ! i ? (char_u *)"dark" : (char_u *)"light", 0); |
|
70 } |
|
71 } |
|
72 } |
|
73 --- 7168,7188 ---- |
|
74 #endif |
|
75 { |
|
76 must_redraw = CLEAR; |
|
77 ! if (color >= 0) |
|
78 ! { |
|
79 ! if (termcap_active) |
|
80 ! term_bg_color(color); |
|
81 ! if (t_colors < 16) |
|
82 ! i = (color == 0 || color == 4); |
|
83 ! else |
|
84 ! i = (color < 7 || color == 8); |
|
85 ! /* Set the 'background' option if the value is |
|
86 ! * wrong. */ |
|
87 ! if (i != (*p_bg == 'd')) |
|
88 ! set_option_value((char_u *)"bg", 0L, |
|
89 ! i ? (char_u *)"dark" |
|
90 ! : (char_u *)"light", 0); |
|
91 ! } |
|
92 } |
|
93 } |
|
94 } |
|
95 *** ../vim-7.2.417/src/version.c 2010-05-13 13:12:01.000000000 +0200 |
|
96 --- src/version.c 2010-05-13 14:29:59.000000000 +0200 |
|
97 *************** |
|
98 *** 683,684 **** |
|
99 --- 683,686 ---- |
|
100 { /* Add new patch number below this line */ |
|
101 + /**/ |
|
102 + 418, |
|
103 /**/ |
|
104 |
|
105 -- |
|
106 hundred-and-one symptoms of being an internet addict: |
|
107 30. Even though you died last week, you've managed to retain OPS on your |
|
108 favorite IRC channel. |
|
109 |
|
110 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ |
|
111 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
|
112 \\\ download, build and distribute -- http://www.A-A-P.org /// |
|
113 \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |
|