CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
gawk: update to 3.1.8
[crossrootfs.git] / readline / readline-6.0-001-004.patch
1 READLINE PATCH REPORT
2 =====================
3
4 Readline-Release: 6.0
5 Patch-ID: readline60-001
6
7 Bug-Reported-by: Nicolai Lissner <nlissne@linux01.org>
8 Bug-Reference-ID: <20090412020510.GA29658@lilith>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-04/msg00104.html
10
11 Bug-Description:
12
13 If a SIGWINCH arrives while bash is performing redisplay, multi-line prompts
14 are displayed incorrectly due to the display code being called recursively.
15
16 Patch:
17
18 *** ../readline-6.0/readline.h 2009-01-04 14:32:33.000000000 -0500
19 --- readline.h 2009-04-13 08:47:00.000000000 -0400
20 ***************
21 *** 815,820 ****
22 #define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
23 #define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
24
25 ! #define RL_STATE_DONE 0x800000 /* done; accepted line */
26
27 #define RL_SETSTATE(x) (rl_readline_state |= (x))
28 --- 815,821 ----
29 #define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
30 #define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
31 + #define RL_STATE_REDISPLAYING 0x800000 /* updating terminal display */
32
33 ! #define RL_STATE_DONE 0x1000000 /* done; accepted line */
34
35 #define RL_SETSTATE(x) (rl_readline_state |= (x))
36 *** ../readline-6.0/display.c 2009-01-04 14:32:32.000000000 -0500
37 --- display.c 2009-04-13 08:29:54.000000000 -0400
38 ***************
39 *** 513,516 ****
40 --- 513,517 ----
41 data structures. */
42 _rl_block_sigint ();
43 + RL_SETSTATE (RL_STATE_REDISPLAYING);
44
45 if (!rl_display_prompt)
46 ***************
47 *** 1237,1240 ****
48 --- 1238,1242 ----
49 }
50
51 + RL_UNSETSTATE (RL_STATE_REDISPLAYING);
52 _rl_release_sigint ();
53 }
54 *** ../readline-6.0/terminal.c 2009-01-04 14:32:34.000000000 -0500
55 --- terminal.c 2009-04-13 08:43:00.000000000 -0400
56 ***************
57 *** 356,360 ****
58 if (CUSTOM_REDISPLAY_FUNC ())
59 rl_forced_update_display ();
60 ! else
61 _rl_redisplay_after_sigwinch ();
62 }
63 --- 356,360 ----
64 if (CUSTOM_REDISPLAY_FUNC ())
65 rl_forced_update_display ();
66 ! else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
67 _rl_redisplay_after_sigwinch ();
68 }
69 *** ../readline-6.0/patchlevel 2008-11-18 11:01:14.000000000 -0500
70 --- patchlevel 2009-05-09 12:01:06.000000000 -0400
71 ***************
72 *** 1,3 ****
73 # Do not edit -- exists only for use by patch
74
75 ! 0
76 --- 1,3 ----
77 # Do not edit -- exists only for use by patch
78
79 ! 1
80 READLINE PATCH REPORT
81 =====================
82
83 Readline-Release: 6.0
84 Patch-ID: readline60-002
85
86 Bug-Reported-by: Matt Zyzik <matt.zyzik@nyu.edu>
87 Bug-Reference-ID: <20090319015542.696F62B8E8@ice.filescope.com>
88 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00149.html
89
90 Bug-Description:
91
92 When not in a locale supporting multibyte characters, readline will occasionally
93 not erase characters between the cursor position and the end of the line
94 when killing text backwards.
95
96 Patch:
97
98 *** ../readline-6.0/display.c 2009-01-04 14:32:32.000000000 -0500
99 --- display.c 2009-04-14 14:00:18.000000000 -0400
100 ***************
101 *** 1775,1779 ****
102 adjust col_lendiff based on the difference between _rl_last_c_pos
103 and _rl_screenwidth */
104 ! if (col_lendiff && (_rl_last_c_pos < _rl_screenwidth))
105 #endif
106 {
107 --- 1775,1779 ----
108 adjust col_lendiff based on the difference between _rl_last_c_pos
109 and _rl_screenwidth */
110 ! if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
111 #endif
112 {
113 *** ../readline-6.0/patchlevel 2008-11-18 11:01:14.000000000 -0500
114 --- patchlevel 2009-05-09 12:01:06.000000000 -0400
115 ***************
116 *** 1,3 ****
117 # Do not edit -- exists only for use by patch
118
119 ! 1
120 --- 1,3 ----
121 # Do not edit -- exists only for use by patch
122
123 ! 2
124 READLINE PATCH REPORT
125 =====================
126
127 Readline-Release: 6.0
128 Patch-ID: readline60-003
129
130 Bug-Reported-by: Andreas Schwab <schwab@linux-m68k.org>
131 Bug-Reference-ID: <m21vrhhx08.fsf@igel.home>
132 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-04/msg00160.html
133
134 Bug-Description:
135
136 If the prompt length exactly matches the screen width, and the prompt ends
137 with invisible characters, readline positions the cursor incorrectly.
138
139 Patch:
140
141 *** ../readline-6.0/display.c 2009-01-04 14:32:32.000000000 -0500
142 --- display.c 2009-04-25 21:42:18.000000000 -0400
143 ***************
144 *** 1895,1898 ****
145 --- 1897,1904 ----
146 woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
147 cpos = _rl_last_c_pos;
148 +
149 + if (cpos == 0 && cpos == new)
150 + return;
151 +
152 #if defined (HANDLE_MULTIBYTE)
153 /* If we have multibyte characters, NEW is indexed by the buffer point in
154 ***************
155 *** 1908,1914 ****
156 desired display position. */
157 if ((new > prompt_last_invisible) || /* XXX - don't use woff here */
158 ! (prompt_physical_chars > _rl_screenwidth &&
159 _rl_last_v_pos == prompt_last_screen_line &&
160 ! wrap_offset >= woff &&
161 new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
162 /* XXX last comparison might need to be >= */
163 --- 1914,1920 ----
164 desired display position. */
165 if ((new > prompt_last_invisible) || /* XXX - don't use woff here */
166 ! (prompt_physical_chars >= _rl_screenwidth &&
167 _rl_last_v_pos == prompt_last_screen_line &&
168 ! wrap_offset >= woff && dpos >= woff &&
169 new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
170 /* XXX last comparison might need to be >= */
171 *** ../readline-6.0/patchlevel 2008-11-18 11:01:14.000000000 -0500
172 --- patchlevel 2009-05-09 12:01:06.000000000 -0400
173 ***************
174 *** 1,3 ****
175 # Do not edit -- exists only for use by patch
176
177 ! 2
178 --- 1,3 ----
179 # Do not edit -- exists only for use by patch
180
181 ! 3
182 READLINE PATCH REPORT
183 =====================
184
185 Readline-Release: 6.0
186 Patch-ID: readline60-004
187
188 Bug-Reported-by: jim@jim.sh
189 Bug-Reference-ID: <200905262140.n4QLeO4X030664@psychosis.jim.sh>
190 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-05/msg00074.html
191
192 Bug-Description:
193
194 There are occasional cursor positioning errors when using readline's
195 horizontal scroll mode.
196
197 Patch:
198
199 *** ../readline-6.0-patched/display.c 2009-05-22 12:32:25.000000000 -0400
200 --- display.c 2009-05-29 23:32:20.000000000 -0400
201 ***************
202 *** 1190,1196 ****
203 line[t - 1] = '>';
204
205 ! if (!rl_display_fixed || forced_display || lmargin != last_lmargin)
206 {
207 forced_display = 0;
208 update_line (&visible_line[last_lmargin],
209 &invisible_line[lmargin],
210 --- 1192,1200 ----
211 line[t - 1] = '>';
212
213 ! if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin)
214 {
215 forced_display = 0;
216 + o_cpos = _rl_last_c_pos;
217 + cpos_adjusted = 0;
218 update_line (&visible_line[last_lmargin],
219 &invisible_line[lmargin],
220 ***************
221 *** 1200,1203 ****
222 --- 1204,1214 ----
223 0);
224
225 + if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
226 + cpos_adjusted == 0 &&
227 + _rl_last_c_pos != o_cpos &&
228 + _rl_last_c_pos > wrap_offset &&
229 + o_cpos < prompt_last_invisible)
230 + _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */
231 +
232 /* If the visible new line is shorter than the old, but the number
233 of invisible characters is greater, and we are at the end of
234 *** ../readline-6.0/patchlevel 2008-11-18 11:01:14.000000000 -0500
235 --- patchlevel 2009-05-09 12:01:06.000000000 -0400
236 ***************
237 *** 1,3 ****
238 # Do not edit -- exists only for use by patch
239
240 ! 3
241 --- 1,3 ----
242 # Do not edit -- exists only for use by patch
243
244 ! 4