rcolebaugh / rpms / bash

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