]>
Commit | Line | Data |
---|---|---|
a8c304fb ER |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 3.1 | |
5 | Patch-ID: bash31-014 | |
6 | ||
7 | Bug-Reported-by: Mike Stroyan <mike.stroyan@hp.com> | |
8 | Bug-Reference-ID: <20060203191607.GC27614@localhost> | |
9 | Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00004.html | |
10 | ||
11 | Bug-Description: | |
12 | ||
13 | The displayed search prompt is corrupted when using non-incremental | |
14 | searches in vi and emacs mode if the prompt contains non-printing | |
15 | characters or spans multiple lines. The prompt is expanded more than | |
16 | once; the second time without the escape sequences that protect non- | |
17 | printing characters from the length calculations. | |
18 | ||
19 | Patch: | |
20 | ||
21 | *** ../bash-3.1-patched/lib/readline/display.c Wed Nov 30 14:05:02 2005 | |
22 | --- lib/readline/display.c Sat Feb 18 12:14:58 2006 | |
23 | *************** | |
24 | *** 1983,1993 **** | |
25 | int pchar; | |
26 | { | |
27 | int len; | |
28 | ! char *pmt; | |
29 | ||
30 | rl_save_prompt (); | |
31 | ||
32 | ! if (saved_local_prompt == 0) | |
33 | { | |
34 | len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0; | |
35 | pmt = (char *)xmalloc (len + 2); | |
36 | --- 1998,2012 ---- | |
37 | int pchar; | |
38 | { | |
39 | int len; | |
40 | ! char *pmt, *p; | |
41 | ||
42 | rl_save_prompt (); | |
43 | ||
44 | ! /* We've saved the prompt, and can do anything with the various prompt | |
45 | ! strings we need before they're restored. We want the unexpanded | |
46 | ! portion of the prompt string after any final newline. */ | |
47 | ! p = rl_prompt ? strrchr (rl_prompt, '\n') : 0; | |
48 | ! if (p == 0) | |
49 | { | |
50 | len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0; | |
51 | pmt = (char *)xmalloc (len + 2); | |
52 | *************** | |
53 | *** 1998,2016 **** | |
54 | } | |
55 | else | |
56 | { | |
57 | ! len = *saved_local_prompt ? strlen (saved_local_prompt) : 0; | |
58 | pmt = (char *)xmalloc (len + 2); | |
59 | if (len) | |
60 | ! strcpy (pmt, saved_local_prompt); | |
61 | pmt[len] = pchar; | |
62 | pmt[len+1] = '\0'; | |
63 | ! local_prompt = savestring (pmt); | |
64 | ! prompt_last_invisible = saved_last_invisible; | |
65 | ! prompt_visible_length = saved_visible_length + 1; | |
66 | ! } | |
67 | ||
68 | prompt_physical_chars = saved_physical_chars + 1; | |
69 | - | |
70 | return pmt; | |
71 | } | |
72 | ||
73 | --- 2017,2033 ---- | |
74 | } | |
75 | else | |
76 | { | |
77 | ! p++; | |
78 | ! len = strlen (p); | |
79 | pmt = (char *)xmalloc (len + 2); | |
80 | if (len) | |
81 | ! strcpy (pmt, p); | |
82 | pmt[len] = pchar; | |
83 | pmt[len+1] = '\0'; | |
84 | ! } | |
85 | ||
86 | + /* will be overwritten by expand_prompt, called from rl_message */ | |
87 | prompt_physical_chars = saved_physical_chars + 1; | |
88 | return pmt; | |
89 | } | |
90 | ||
91 | *** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005 | |
92 | --- patchlevel.h Wed Dec 7 13:48:42 2005 | |
93 | *************** | |
94 | *** 26,30 **** | |
95 | looks for to find the patch level (for the sccs version string). */ | |
96 | ||
97 | ! #define PATCHLEVEL 13 | |
98 | ||
99 | #endif /* _PATCHLEVEL_H_ */ | |
100 | --- 26,30 ---- | |
101 | looks for to find the patch level (for the sccs version string). */ | |
102 | ||
103 | ! #define PATCHLEVEL 14 | |
104 | ||
105 | #endif /* _PATCHLEVEL_H_ */ |