summaryrefslogtreecommitdiffstats
path: root/source/l/readline/readline-5.2-patches/readline52-004
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/l/readline/readline-5.2-patches/readline52-004
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'source/l/readline/readline-5.2-patches/readline52-004')
-rw-r--r--source/l/readline/readline-5.2-patches/readline52-00470
1 files changed, 70 insertions, 0 deletions
diff --git a/source/l/readline/readline-5.2-patches/readline52-004 b/source/l/readline/readline-5.2-patches/readline52-004
new file mode 100644
index 000000000..b165ad9f4
--- /dev/null
+++ b/source/l/readline/readline-5.2-patches/readline52-004
@@ -0,0 +1,70 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 5.2
+Patch-ID: readline52-004
+
+Bug-Reported-by: Peter Volkov <torre_cremata@mail.ru>
+Bug-Reference-ID: <1173636022.7039.36.camel@localhost>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00039.html
+
+Bug-Description:
+
+When restoring the original prompt after finishing an incremental search,
+bash sometimes places the cursor incorrectly if the primary prompt contains
+invisible characters.
+
+Patch:
+
+*** ../readline-5.2.3/display.c Fri Apr 20 13:30:16 2007
+--- display.c Fri Apr 20 15:17:01 2007
+***************
+*** 1599,1604 ****
+ if (temp > 0)
+ {
+ _rl_output_some_chars (nfd, temp);
+! _rl_last_c_pos += _rl_col_width (nfd, 0, temp);;
+ }
+ }
+--- 1599,1618 ----
+ if (temp > 0)
+ {
++ /* If nfd begins at the prompt, or before the invisible
++ characters in the prompt, we need to adjust _rl_last_c_pos
++ in a multibyte locale to account for the wrap offset and
++ set cpos_adjusted accordingly. */
+ _rl_output_some_chars (nfd, temp);
+! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+! {
+! _rl_last_c_pos += _rl_col_width (nfd, 0, temp);
+! if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
+! {
+! _rl_last_c_pos -= wrap_offset;
+! cpos_adjusted = 1;
+! }
+! }
+! else
+! _rl_last_c_pos += temp;
+ }
+ }
+***************
+*** 1608,1613 ****
+--- 1622,1639 ----
+ if (temp > 0)
+ {
++ /* If nfd begins at the prompt, or before the invisible
++ characters in the prompt, we need to adjust _rl_last_c_pos
++ in a multibyte locale to account for the wrap offset and
++ set cpos_adjusted accordingly. */
+ _rl_output_some_chars (nfd, temp);
+ _rl_last_c_pos += col_temp; /* XXX */
++ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
++ {
++ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
++ {
++ _rl_last_c_pos -= wrap_offset;
++ cpos_adjusted = 1;
++ }
++ }
+ }
+ lendiff = (oe - old) - (ne - new);