]>
Commit | Line | Data |
---|---|---|
387ec419 AM |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 4.0 | |
5 | Patch-ID: bash40-027 | |
6 | ||
7 | Bug-Reported-by: jim@jim.sh | |
8 | Bug-Reference-ID: <200905262140.n4QLeO4X030664@psychosis.jim.sh> | |
9 | Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-05/msg00074.html | |
10 | ||
11 | Bug-Description: | |
12 | ||
13 | There are occasional cursor positioning errors when using readline's | |
14 | horizontal scroll mode. | |
15 | ||
16 | Patch: | |
17 | ||
18 | *** ../bash-4.0-patched/lib/readline/display.c 2009-05-22 12:32:25.000000000 -0400 | |
19 | --- lib/readline/display.c 2009-05-29 23:32:20.000000000 -0400 | |
20 | *************** | |
21 | *** 1190,1196 **** | |
22 | line[t - 1] = '>'; | |
23 | ||
24 | ! if (!rl_display_fixed || forced_display || lmargin != last_lmargin) | |
25 | { | |
26 | forced_display = 0; | |
27 | update_line (&visible_line[last_lmargin], | |
28 | &invisible_line[lmargin], | |
29 | --- 1192,1200 ---- | |
30 | line[t - 1] = '>'; | |
31 | ||
32 | ! if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin) | |
33 | { | |
34 | forced_display = 0; | |
35 | + o_cpos = _rl_last_c_pos; | |
36 | + cpos_adjusted = 0; | |
37 | update_line (&visible_line[last_lmargin], | |
38 | &invisible_line[lmargin], | |
39 | *************** | |
40 | *** 1200,1203 **** | |
41 | --- 1204,1214 ---- | |
42 | 0); | |
43 | ||
44 | + if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && | |
45 | + cpos_adjusted == 0 && | |
46 | + _rl_last_c_pos != o_cpos && | |
47 | + _rl_last_c_pos > wrap_offset && | |
48 | + o_cpos < prompt_last_invisible) | |
49 | + _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ | |
50 | + | |
51 | /* If the visible new line is shorter than the old, but the number | |
52 | of invisible characters is greater, and we are at the end of | |
53 | *** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500 | |
54 | --- patchlevel.h 2009-02-22 16:11:31.000000000 -0500 | |
55 | *************** | |
56 | *** 26,30 **** | |
57 | looks for to find the patch level (for the sccs version string). */ | |
58 | ||
59 | ! #define PATCHLEVEL 26 | |
60 | ||
61 | #endif /* _PATCHLEVEL_H_ */ | |
62 | --- 26,30 ---- | |
63 | looks for to find the patch level (for the sccs version string). */ | |
64 | ||
65 | ! #define PATCHLEVEL 27 | |
66 | ||
67 | #endif /* _PATCHLEVEL_H_ */ |