Tomas Janousek 5a0cfd
			     BASH PATCH REPORT
Tomas Janousek 5a0cfd
			     =================
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Bash-Release: 3.2
Tomas Janousek 5a0cfd
Patch-ID: bash32-016
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Bug-Reported-by: Peter Volkov <torre_cremata@mail.ru>
Tomas Janousek 5a0cfd
Bug-Reference-ID: <1171795523.8021.18.camel@localhost>
Tomas Janousek 5a0cfd
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-02/msg00054.html
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Bug-Description:
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
When moving the cursor, bash sometimes misplaces the cursor when the prompt
Tomas Janousek 5a0cfd
contains two or more multibyte characters.  The particular circumstance that
Tomas Janousek 5a0cfd
uncovered the problem was having the (multibyte) current directory name in
Tomas Janousek 5a0cfd
the prompt string.
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Patch:
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
*** ../bash-3.2/lib/readline/display.c	Fri Jan 19 13:34:50 2007
Tomas Janousek 5a0cfd
--- lib/readline/display.c	Sat Mar 10 17:25:44 2007
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 1745,1749 ****
Tomas Janousek 5a0cfd
      {
Tomas Janousek 5a0cfd
        dpos = _rl_col_width (data, 0, new);
Tomas Janousek 5a0cfd
!       if (dpos > prompt_last_invisible)		/* XXX - don't use woff here */
Tomas Janousek 5a0cfd
  	{
Tomas Janousek 5a0cfd
  	  dpos -= woff;
Tomas Janousek 5a0cfd
--- 1745,1752 ----
Tomas Janousek 5a0cfd
      {
Tomas Janousek 5a0cfd
        dpos = _rl_col_width (data, 0, new);
Tomas Janousek 5a0cfd
!       /* Use NEW when comparing against the last invisible character in the
Tomas Janousek 5a0cfd
! 	 prompt string, since they're both buffer indices and DPOS is a
Tomas Janousek 5a0cfd
! 	 desired display position. */
Tomas Janousek 5a0cfd
!       if (new > prompt_last_invisible)		/* XXX - don't use woff here */
Tomas Janousek 5a0cfd
  	{
Tomas Janousek 5a0cfd
  	  dpos -= woff;
Tomas Janousek 5a0cfd
*** ../bash-3.2/patchlevel.h	Thu Apr 13 08:31:04 2006
Tomas Janousek 5a0cfd
--- patchlevel.h	Mon Oct 16 14:22:54 2006
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 26,30 ****
Tomas Janousek 5a0cfd
     looks for to find the patch level (for the sccs version string). */
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! #define PATCHLEVEL 15
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
  #endif /* _PATCHLEVEL_H_ */
Tomas Janousek 5a0cfd
--- 26,30 ----
Tomas Janousek 5a0cfd
     looks for to find the patch level (for the sccs version string). */
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! #define PATCHLEVEL 16
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
  #endif /* _PATCHLEVEL_H_ */