7 Bug-Reported-by: Andreas Schwab <schwab@linux-m68k.org>
8 Bug-Reference-ID: <m21vrhhx08.fsf@igel.home>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-04/msg00160.html
13 If the prompt length exactly matches the screen width, and the prompt ends
14 with invisible characters, readline positions the cursor incorrectly.
18 *** ../bash-4.0-patched/lib/readline/display.c 2009-01-04 14:32:32.000000000 -0500
19 --- lib/readline/display.c 2009-04-25 21:42:18.000000000 -0400
23 woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
24 cpos = _rl_last_c_pos;
26 + if (cpos == 0 && cpos == new)
29 #if defined (HANDLE_MULTIBYTE)
30 /* If we have multibyte characters, NEW is indexed by the buffer point in
33 desired display position. */
34 if ((new > prompt_last_invisible) || /* XXX - don't use woff here */
35 ! (prompt_physical_chars > _rl_screenwidth &&
36 _rl_last_v_pos == prompt_last_screen_line &&
37 ! wrap_offset >= woff &&
38 new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
39 /* XXX last comparison might need to be >= */
41 desired display position. */
42 if ((new > prompt_last_invisible) || /* XXX - don't use woff here */
43 ! (prompt_physical_chars >= _rl_screenwidth &&
44 _rl_last_v_pos == prompt_last_screen_line &&
45 ! wrap_offset >= woff && dpos >= woff &&
46 new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
47 /* XXX last comparison might need to be >= */
48 *** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
49 --- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
52 looks for to find the patch level (for the sccs version string). */
54 ! #define PATCHLEVEL 22
56 #endif /* _PATCHLEVEL_H_ */
58 looks for to find the patch level (for the sccs version string). */
60 ! #define PATCHLEVEL 23
62 #endif /* _PATCHLEVEL_H_ */