5 Patch-ID: readline51-004
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
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.
21 *** readline-5.1-patched/display.c Wed Nov 30 14:05:02 2005
22 --- readline-5.1/display.c Sat Feb 18 12:14:58 2006
32 ! if (saved_local_prompt == 0)
34 len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
35 pmt = (char *)xmalloc (len + 2);
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;
50 len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
51 pmt = (char *)xmalloc (len + 2);
57 ! len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
58 pmt = (char *)xmalloc (len + 2);
60 ! strcpy (pmt, saved_local_prompt);
63 ! local_prompt = savestring (pmt);
64 ! prompt_last_invisible = saved_last_invisible;
65 ! prompt_visible_length = saved_visible_length + 1;
68 prompt_physical_chars = saved_physical_chars + 1;
79 pmt = (char *)xmalloc (len + 2);
86 + /* will be overwritten by expand_prompt, called from rl_message */
87 prompt_physical_chars = saved_physical_chars + 1;