rcolebaugh / rpms / bash

Forked from rpms/bash a year ago
Clone
287226
			     BASH PATCH REPORT
287226
			     =================
287226
287226
Bash-Release:	4.2
287226
Patch-ID:	bash42-037
287226
287226
Bug-Reported-by:	Jakub Filak
287226
Bug-Reference-ID:
287226
Bug-Reference-URL:	https://bugzilla.redhat.com/show_bug.cgi?id=813289
287226
287226
Bug-Description:
287226
287226
Attempting to redo (using `.') the vi editing mode `cc', `dd', or `yy'
287226
commands leads to an infinite loop.
287226
287226
Patch (apply with `patch -p0'):
287226
287226
*** ../bash-4.2-patched/lib/readline/vi_mode.c	2011-02-25 11:17:02.000000000 -0500
287226
--- lib/readline/vi_mode.c	2012-06-02 12:24:47.000000000 -0400
287226
***************
287226
*** 1235,1243 ****
287226
        r = rl_domove_motion_callback (_rl_vimvcxt);
287226
      }
287226
!   else if (vi_redoing)
287226
      {
287226
        _rl_vimvcxt->motion = _rl_vi_last_motion;
287226
        r = rl_domove_motion_callback (_rl_vimvcxt);
287226
      }
287226
  #if defined (READLINE_CALLBACKS)
287226
    else if (RL_ISSTATE (RL_STATE_CALLBACK))
287226
--- 1297,1313 ----
287226
        r = rl_domove_motion_callback (_rl_vimvcxt);
287226
      }
287226
!   else if (vi_redoing && _rl_vi_last_motion != 'd')	/* `dd' is special */
287226
      {
287226
        _rl_vimvcxt->motion = _rl_vi_last_motion;
287226
        r = rl_domove_motion_callback (_rl_vimvcxt);
287226
      }
287226
+   else if (vi_redoing)		/* handle redoing `dd' here */
287226
+     {
287226
+       _rl_vimvcxt->motion = _rl_vi_last_motion;
287226
+       rl_mark = rl_end;
287226
+       rl_beg_of_line (1, key);
287226
+       RL_UNSETSTATE (RL_STATE_VIMOTION);
287226
+       r = vidomove_dispatch (_rl_vimvcxt);
287226
+     }
287226
  #if defined (READLINE_CALLBACKS)
287226
    else if (RL_ISSTATE (RL_STATE_CALLBACK))
287226
***************
287226
*** 1317,1325 ****
287226
        r = rl_domove_motion_callback (_rl_vimvcxt);
287226
      }
287226
!   else if (vi_redoing)
287226
      {
287226
        _rl_vimvcxt->motion = _rl_vi_last_motion;
287226
        r = rl_domove_motion_callback (_rl_vimvcxt);
287226
      }
287226
  #if defined (READLINE_CALLBACKS)
287226
    else if (RL_ISSTATE (RL_STATE_CALLBACK))
287226
--- 1387,1403 ----
287226
        r = rl_domove_motion_callback (_rl_vimvcxt);
287226
      }
287226
!   else if (vi_redoing && _rl_vi_last_motion != 'c')	/* `cc' is special */
287226
      {
287226
        _rl_vimvcxt->motion = _rl_vi_last_motion;
287226
        r = rl_domove_motion_callback (_rl_vimvcxt);
287226
      }
287226
+   else if (vi_redoing)		/* handle redoing `cc' here */
287226
+     {
287226
+       _rl_vimvcxt->motion = _rl_vi_last_motion;
287226
+       rl_mark = rl_end;
287226
+       rl_beg_of_line (1, key);
287226
+       RL_UNSETSTATE (RL_STATE_VIMOTION);
287226
+       r = vidomove_dispatch (_rl_vimvcxt);
287226
+     }
287226
  #if defined (READLINE_CALLBACKS)
287226
    else if (RL_ISSTATE (RL_STATE_CALLBACK))
287226
***************
287226
*** 1378,1381 ****
287226
--- 1456,1472 ----
287226
        r = rl_domove_motion_callback (_rl_vimvcxt);
287226
      }
287226
+   else if (vi_redoing && _rl_vi_last_motion != 'y')	/* `yy' is special */
287226
+     {
287226
+       _rl_vimvcxt->motion = _rl_vi_last_motion;
287226
+       r = rl_domove_motion_callback (_rl_vimvcxt);
287226
+     }
287226
+   else if (vi_redoing)			/* handle redoing `yy' here */
287226
+     {
287226
+       _rl_vimvcxt->motion = _rl_vi_last_motion;
287226
+       rl_mark = rl_end;
287226
+       rl_beg_of_line (1, key);
287226
+       RL_UNSETSTATE (RL_STATE_VIMOTION);
287226
+       r = vidomove_dispatch (_rl_vimvcxt);
287226
+     }
287226
  #if defined (READLINE_CALLBACKS)
287226
    else if (RL_ISSTATE (RL_STATE_CALLBACK))
287226
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
287226
--- patchlevel.h	Thu Feb 24 21:41:34 2011
287226
***************
287226
*** 26,30 ****
287226
     looks for to find the patch level (for the sccs version string). */
287226
  
287226
! #define PATCHLEVEL 36
287226
  
287226
  #endif /* _PATCHLEVEL_H_ */
287226
--- 26,30 ----
287226
     looks for to find the patch level (for the sccs version string). */
287226
  
287226
! #define PATCHLEVEL 37
287226
  
287226
  #endif /* _PATCHLEVEL_H_ */