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