7 Bug-Reported-by: alexander@skwar.name
8 Tomohiro KUBOTA <debian@tmail.plala.or.jp>
9 Bug-Reference-ID: <20040801124721.C69B8A2547A@server.bei.digitalprojects.com>
10 <16688.41450.433668.480445@gargle.gargle.HOWL>
11 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00006.html
12 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257540
16 Prompts with multibyte characters or invisible characters following a line
17 wrap are displayed incorrectly.
21 *** ../bash-3.0/lib/readline/display.c Thu May 27 22:57:51 2004
22 --- lib/readline/display.c Mon Aug 30 11:55:02 2004
27 ! int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars;
29 /* Short-circuit if we can. */
33 ! int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
35 /* Short-circuit if we can. */
40 invfl = 0; /* invisible chars in first line of prompt */
41 + invflset = 0; /* we only want to set invfl once */
43 for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
56 ! physchars += _rl_col_width (pmt, pind, ind);
64 ! rl++; /* visible length byte counter */
66 ninvis++; /* invisible chars byte counter */
69 ! if (rl >= _rl_screenwidth)
80 ! rl++; /* visible length byte counter */
84 ninvis++; /* invisible chars byte counter */
87 ! if (invflset == 0 && rl >= _rl_screenwidth)
97 int c_pos, inv_botlin, lb_botlin, lb_linenum;
98 ! int newlines, lpos, temp, modmark;
99 char *prompt_this_line;
100 #if defined (HANDLE_MULTIBYTE)
103 int c_pos, inv_botlin, lb_botlin, lb_linenum;
104 ! int newlines, lpos, temp, modmark, n0, num;
105 char *prompt_this_line;
106 #if defined (HANDLE_MULTIBYTE)
110 #if defined (HANDLE_MULTIBYTE)
111 memset (_rl_wrapped_line, 0, vis_lbsize);
118 prompts that exceed two physical lines?
119 Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
120 + #if defined (HANDLE_MULTIBYTE)
122 + temp = local_prompt ? strlen (local_prompt) : 0;
125 + if (_rl_col_width (local_prompt, n0, num) > _rl_screenwidth)
127 + num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
134 temp = ((newlines + 1) * _rl_screenwidth) +
135 + #endif /* !HANDLE_MULTIBYTE */
136 ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
137 : ((newlines == 1) ? wrap_offset : 0))
142 inv_lbreaks[++newlines] = temp;
143 + #if defined (HANDLE_MULTIBYTE)
144 + lpos -= _rl_col_width (local_prompt, n0, num);
146 lpos -= _rl_screenwidth;
151 *** ../bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
152 --- patchlevel.h Thu Sep 2 15:04:32 2004
155 looks for to find the patch level (for the sccs version string). */
157 ! #define PATCHLEVEL 5
159 #endif /* _PATCHLEVEL_H_ */
161 looks for to find the patch level (for the sccs version string). */
163 ! #define PATCHLEVEL 6
165 #endif /* _PATCHLEVEL_H_ */