]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/bash/bash32-017
Merge remote-tracking branch 'origin/next' into thirteen
[people/teissler/ipfire-2.x.git] / src / patches / bash / bash32-017
1 BASH PATCH REPORT
2 =================
3
4 Bash-Release: 3.2
5 Patch-ID: bash32-017
6
7 Bug-Reported-by: Peter Volkov <torre_cremata@mail.ru>
8 Bug-Reference-ID: <1173636022.7039.36.camel@localhost>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00039.html
10
11 Bug-Description:
12
13 When restoring the original prompt after finishing an incremental search,
14 bash sometimes places the cursor incorrectly if the primary prompt contains
15 invisible characters.
16
17 Patch:
18
19 *** ../bash-3.2.16/lib/readline/display.c Fri Apr 20 13:30:16 2007
20 --- lib/readline/display.c Fri Apr 20 15:17:01 2007
21 ***************
22 *** 1599,1604 ****
23 if (temp > 0)
24 {
25 _rl_output_some_chars (nfd, temp);
26 ! _rl_last_c_pos += _rl_col_width (nfd, 0, temp);;
27 }
28 }
29 --- 1599,1618 ----
30 if (temp > 0)
31 {
32 + /* If nfd begins at the prompt, or before the invisible
33 + characters in the prompt, we need to adjust _rl_last_c_pos
34 + in a multibyte locale to account for the wrap offset and
35 + set cpos_adjusted accordingly. */
36 _rl_output_some_chars (nfd, temp);
37 ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
38 ! {
39 ! _rl_last_c_pos += _rl_col_width (nfd, 0, temp);
40 ! if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
41 ! {
42 ! _rl_last_c_pos -= wrap_offset;
43 ! cpos_adjusted = 1;
44 ! }
45 ! }
46 ! else
47 ! _rl_last_c_pos += temp;
48 }
49 }
50 ***************
51 *** 1608,1613 ****
52 --- 1622,1639 ----
53 if (temp > 0)
54 {
55 + /* If nfd begins at the prompt, or before the invisible
56 + characters in the prompt, we need to adjust _rl_last_c_pos
57 + in a multibyte locale to account for the wrap offset and
58 + set cpos_adjusted accordingly. */
59 _rl_output_some_chars (nfd, temp);
60 _rl_last_c_pos += col_temp; /* XXX */
61 + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
62 + {
63 + if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
64 + {
65 + _rl_last_c_pos -= wrap_offset;
66 + cpos_adjusted = 1;
67 + }
68 + }
69 }
70 lendiff = (oe - old) - (ne - new);
71 *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
72 --- patchlevel.h Mon Oct 16 14:22:54 2006
73 ***************
74 *** 26,30 ****
75 looks for to find the patch level (for the sccs version string). */
76
77 ! #define PATCHLEVEL 16
78
79 #endif /* _PATCHLEVEL_H_ */
80 --- 26,30 ----
81 looks for to find the patch level (for the sccs version string). */
82
83 ! #define PATCHLEVEL 17
84
85 #endif /* _PATCHLEVEL_H_ */