[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/readline/devel readline-5.2-003.patch, NONE, 1.1 readline-5.2-004.patch, NONE, 1.1 readline.spec, 1.32, 1.33



Author: mlichvar

Update of /cvs/pkgs/rpms/readline/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2257

Modified Files:
	readline.spec 
Added Files:
	readline-5.2-003.patch readline-5.2-004.patch 
Log Message:
- include patches 5.2-003, 5.2-004


readline-5.2-003.patch:

--- NEW FILE readline-5.2-003.patch ---
			   READLINE PATCH REPORT
			   =====================

Readline-Release: 5.2
Patch-ID: readline52-003

Bug-Reported-by: Peter Volkov <torre_cremata mail ru>
Bug-Reference-ID: <1171795523 8021 18 camel localhost>
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-02/msg00054.html

Bug-Description:

When moving the cursor, bash sometimes misplaces the cursor when the prompt
contains two or more multibyte characters.  The particular circumstance that
uncovered the problem was having the (multibyte) current directory name in
the prompt string.

Patch:

*** ../readline-5.2.2/display.c	Fri Jan 19 13:34:50 2007
--- display.c	Sat Mar 10 17:25:44 2007
***************
*** 1745,1749 ****
      {
        dpos = _rl_col_width (data, 0, new);
!       if (dpos > prompt_last_invisible)		/* XXX - don't use woff here */
  	{
  	  dpos -= woff;
--- 1745,1752 ----
      {
        dpos = _rl_col_width (data, 0, new);
!       /* Use NEW when comparing against the last invisible character in the
! 	 prompt string, since they're both buffer indices and DPOS is a
! 	 desired display position. */
!       if (new > prompt_last_invisible)		/* XXX - don't use woff here */
  	{
  	  dpos -= woff;

readline-5.2-004.patch:

--- NEW FILE readline-5.2-004.patch ---
			   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);


Index: readline.spec
===================================================================
RCS file: /cvs/pkgs/rpms/readline/devel/readline.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- readline.spec	22 Mar 2007 11:04:51 -0000	1.32
+++ readline.spec	29 May 2007 13:38:22 -0000	1.33
@@ -1,7 +1,7 @@
 Summary: A library for editing typed command lines
 Name: readline
 Version: 5.2
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: GPL
 Group: System Environment/Libraries
 URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
@@ -9,6 +9,8 @@
 Patch1: readline-5.2-shlib.patch
 Patch2: readline-5.2-001.patch
 Patch3: readline-5.2-002.patch
+Patch4: readline-5.2-003.patch
+Patch5: readline-5.2-004.patch
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
 BuildRequires: ncurses-devel
@@ -50,6 +52,8 @@
 %patch1 -p1 -b .shlib
 %patch2 -p0 -b .001
 %patch3 -p0 -b .002
+%patch4 -p0 -b .003
+%patch5 -p0 -b .004
 
 rm -f examples/rlfe/configure
 
@@ -113,6 +117,9 @@
 %{_libdir}/lib*.a
 
 %changelog
+* Tue May 29 2007 Miroslav Lichvar <mlichvar redhat com> 5.2-5
+- include patches 5.2-003, 5.2-004
+
 * Thu Mar 22 2007 Miroslav Lichvar <mlichvar redhat com> 5.2-4
 - apply 5.2-002 patch
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]