]>
Commit | Line | Data |
---|---|---|
fb8ce753 AM |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 4.0 | |
5 | Patch-ID: bash40-023 | |
6 | ||
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 | |
10 | ||
11 | Bug-Description: | |
12 | ||
13 | If the prompt length exactly matches the screen width, and the prompt ends | |
14 | with invisible characters, readline positions the cursor incorrectly. | |
15 | ||
16 | Patch: | |
17 | ||
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 | |
20 | *************** | |
21 | *** 1895,1898 **** | |
22 | --- 1897,1904 ---- | |
23 | woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset); | |
24 | cpos = _rl_last_c_pos; | |
25 | + | |
26 | + if (cpos == 0 && cpos == new) | |
27 | + return; | |
28 | + | |
29 | #if defined (HANDLE_MULTIBYTE) | |
30 | /* If we have multibyte characters, NEW is indexed by the buffer point in | |
31 | *************** | |
32 | *** 1908,1914 **** | |
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 >= */ | |
40 | --- 1914,1920 ---- | |
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 | |
50 | *************** | |
51 | *** 26,30 **** | |
52 | looks for to find the patch level (for the sccs version string). */ | |
53 | ||
54 | ! #define PATCHLEVEL 22 | |
55 | ||
56 | #endif /* _PATCHLEVEL_H_ */ | |
57 | --- 26,30 ---- | |
58 | looks for to find the patch level (for the sccs version string). */ | |
59 | ||
60 | ! #define PATCHLEVEL 23 | |
61 | ||
62 | #endif /* _PATCHLEVEL_H_ */ |