summaryrefslogtreecommitdiffstats
path: root/package/readline/readline51-004
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-03-23 03:04:47 +0000
committerMike Frysinger <vapier@gentoo.org>2006-03-23 03:04:47 +0000
commitc295d3a9e3a5b65bfcc82ebea64edf80d4309146 (patch)
tree67de8f47c2ccfedea6e344abf71e011d8de607d7 /package/readline/readline51-004
parent2b58b9d12c379a4d37b6a7f9d5e23d0fb061919e (diff)
downloadbuildroot-novena-c295d3a9e3a5b65bfcc82ebea64edf80d4309146.tar.gz
buildroot-novena-c295d3a9e3a5b65bfcc82ebea64edf80d4309146.zip
some more patches from upstream
Diffstat (limited to 'package/readline/readline51-004')
-rw-r--r--package/readline/readline51-00490
1 files changed, 90 insertions, 0 deletions
diff --git a/package/readline/readline51-004 b/package/readline/readline51-004
new file mode 100644
index 000000000..2bdba2baa
--- /dev/null
+++ b/package/readline/readline51-004
@@ -0,0 +1,90 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 5.1
+Patch-ID: readline51-004
+
+Bug-Reported-by: Mike Stroyan <mike.stroyan@hp.com>
+Bug-Reference-ID: <20060203191607.GC27614@localhost>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00004.html
+
+Bug-Description:
+
+The displayed search prompt is corrupted when using non-incremental
+searches in vi and emacs mode if the prompt contains non-printing
+characters or spans multiple lines. The prompt is expanded more than
+once; the second time without the escape sequences that protect non-
+printing characters from the length calculations.
+
+Patch:
+
+*** readline-5.1-patched/display.c Wed Nov 30 14:05:02 2005
+--- readline-5.1/display.c Sat Feb 18 12:14:58 2006
+***************
+*** 1983,1993 ****
+ int pchar;
+ {
+ int len;
+! char *pmt;
+
+ rl_save_prompt ();
+
+! if (saved_local_prompt == 0)
+ {
+ len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
+ pmt = (char *)xmalloc (len + 2);
+--- 1998,2012 ----
+ int pchar;
+ {
+ int len;
+! char *pmt, *p;
+
+ rl_save_prompt ();
+
+! /* We've saved the prompt, and can do anything with the various prompt
+! strings we need before they're restored. We want the unexpanded
+! portion of the prompt string after any final newline. */
+! p = rl_prompt ? strrchr (rl_prompt, '\n') : 0;
+! if (p == 0)
+ {
+ len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
+ pmt = (char *)xmalloc (len + 2);
+***************
+*** 1998,2016 ****
+ }
+ else
+ {
+! len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
+ pmt = (char *)xmalloc (len + 2);
+ if (len)
+! strcpy (pmt, saved_local_prompt);
+ pmt[len] = pchar;
+ pmt[len+1] = '\0';
+! local_prompt = savestring (pmt);
+! prompt_last_invisible = saved_last_invisible;
+! prompt_visible_length = saved_visible_length + 1;
+! }
+
+ prompt_physical_chars = saved_physical_chars + 1;
+-
+ return pmt;
+ }
+
+--- 2017,2033 ----
+ }
+ else
+ {
+! p++;
+! len = strlen (p);
+ pmt = (char *)xmalloc (len + 2);
+ if (len)
+! strcpy (pmt, p);
+ pmt[len] = pchar;
+ pmt[len+1] = '\0';
+! }
+
++ /* will be overwritten by expand_prompt, called from rl_message */
+ prompt_physical_chars = saved_physical_chars + 1;
+ return pmt;
+ }
+