5 Patch-ID: readline60-001
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
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.
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
22 #define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
23 #define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
25 ! #define RL_STATE_DONE 0x800000 /* done; accepted line */
27 #define RL_SETSTATE(x) (rl_readline_state |= (x))
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 */
33 ! #define RL_STATE_DONE 0x1000000 /* done; accepted line */
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
43 + RL_SETSTATE (RL_STATE_REDISPLAYING);
45 if (!rl_display_prompt)
51 + RL_UNSETSTATE (RL_STATE_REDISPLAYING);
52 _rl_release_sigint ();
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
58 if (CUSTOM_REDISPLAY_FUNC ())
59 rl_forced_update_display ();
61 _rl_redisplay_after_sigwinch ();
64 if (CUSTOM_REDISPLAY_FUNC ())
65 rl_forced_update_display ();
66 ! else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
67 _rl_redisplay_after_sigwinch ();
69 *** ../readline-6.0/patchlevel 2008-11-18 11:01:14.000000000 -0500
70 --- patchlevel 2009-05-09 12:01:06.000000000 -0400
73 # Do not edit -- exists only for use by patch
77 # Do not edit -- exists only for use by patch
84 Patch-ID: readline60-002
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
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.
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
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))
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)))
113 *** ../readline-6.0/patchlevel 2008-11-18 11:01:14.000000000 -0500
114 --- patchlevel 2009-05-09 12:01:06.000000000 -0400
117 # Do not edit -- exists only for use by patch
121 # Do not edit -- exists only for use by patch
124 READLINE PATCH REPORT
125 =====================
127 Readline-Release: 6.0
128 Patch-ID: readline60-003
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
136 If the prompt length exactly matches the screen width, and the prompt ends
137 with invisible characters, readline positions the cursor incorrectly.
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
146 woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
147 cpos = _rl_last_c_pos;
149 + if (cpos == 0 && cpos == new)
152 #if defined (HANDLE_MULTIBYTE)
153 /* If we have multibyte characters, NEW is indexed by the buffer point in
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 >= */
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
175 # Do not edit -- exists only for use by patch
179 # Do not edit -- exists only for use by patch
182 READLINE PATCH REPORT
183 =====================
185 Readline-Release: 6.0
186 Patch-ID: readline60-004
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
194 There are occasional cursor positioning errors when using readline's
195 horizontal scroll mode.
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
205 ! if (!rl_display_fixed || forced_display || lmargin != last_lmargin)
208 update_line (&visible_line[last_lmargin],
209 &invisible_line[lmargin],
213 ! if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin)
216 + o_cpos = _rl_last_c_pos;
218 update_line (&visible_line[last_lmargin],
219 &invisible_line[lmargin],
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 */
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
238 # Do not edit -- exists only for use by patch
242 # Do not edit -- exists only for use by patch