From 0798c851473a20887639ca3dcd8a87ab15fc4baa Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 19 Apr 2007 23:16:23 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=6 --- bash.changes | 5 ++++ bash.spec | 10 +++++--- readline-5.2-update-line.patch | 47 ++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 readline-5.2-update-line.patch diff --git a/bash.changes b/bash.changes index 68ef33ec..f4c1b41f 100644 --- a/bash.changes +++ b/bash.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 19 13:33:30 CEST 2007 - schwab@suse.de + +- Fix bug in readline redisplay. + ------------------------------------------------------------------- Thu Mar 29 13:25:57 CEST 2007 - dmueller@suse.de diff --git a/bash.spec b/bash.spec index 65ac9782..7ab0fbe7 100644 --- a/bash.spec +++ b/bash.spec @@ -17,7 +17,7 @@ Group: System/Shells Requires: readline >= 5.2 Autoreqprov: on Version: 3.2 -Release: 18 +Release: 20 %define bash_vers 3.2 %define rl_vers 5.2 Summary: The GNU Bourne-Again Shell @@ -45,6 +45,7 @@ Patch21: readline-4.3-input.dif Patch22: readline-5.2-wrap.patch Patch23: readline-5.2-conf.patch Patch30: readline-5.1-destdir.patch +Patch31: readline-5.2-update-line.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -66,7 +67,7 @@ Summary: The Readline Library Group: System/Libraries Provides: bash:/lib/libreadline.so.5 Version: 5.2 -Release: 18 +Release: 20 Autoreqprov: on %description -n readline @@ -86,7 +87,7 @@ Summary: Include Files and Libraries mandatory for Development. Group: Development/Libraries/C and C++ Provides: bash:/usr/lib/libreadline.a Version: 5.2 -Release: 18 +Release: 20 Requires: readline = %{version}-%{release}, %{_libdir}/libncurses.so Requires: ncurses-devel Autoreqprov: on @@ -148,6 +149,7 @@ done %patch22 -p2 -b .wrap %patch23 -p2 -b .conf %patch30 -p0 -b .destdir +%patch31 -p0 %patch20 -p0 %build @@ -330,6 +332,8 @@ rm -rf $RPM_BUILD_ROOT %doc %{_mandir}/man3/readline.3.gz %changelog +* Thu Apr 19 2007 - schwab@suse.de +- Fix bug in readline redisplay. * Thu Mar 29 2007 - dmueller@suse.de - add ncurses-devel requires to readline-devel * Mon Mar 26 2007 - rguenther@suse.de diff --git a/readline-5.2-update-line.patch b/readline-5.2-update-line.patch new file mode 100644 index 00000000..5a8d61e5 --- /dev/null +++ b/readline-5.2-update-line.patch @@ -0,0 +1,47 @@ +--- display.c 2007/04/11 08:37:02 1.48 ++++ display.c 2007/04/11 08:41:29 +@@ -1589,8 +1589,22 @@ update_line (old, new, current_line, oma + temp = nls - nfd; + 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 += _rl_col_width (nfd, 0, 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; + } + } + /* Otherwise, print over the existing material. */ +@@ -1598,8 +1612,20 @@ update_line (old, new, current_line, oma + { + 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); + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)