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