5 Patch-ID: readline62-004
7 Bug-Reported-by: Jakub Filak
9 Bug-Reference-URL: https://bugzilla.redhat.com/show_bug.cgi?id=813289
13 Attempting to redo (using `.') the vi editing mode `cc', `dd', or `yy'
14 commands leads to an infinite loop.
16 Patch (apply with `patch -p0'):
18 *** ../readline-6.2-patched/vi_mode.c 2011-02-25 11:17:02.000000000 -0500
19 --- vi_mode.c 2012-06-02 12:24:47.000000000 -0400
22 r = rl_domove_motion_callback (_rl_vimvcxt);
24 ! else if (vi_redoing)
26 _rl_vimvcxt->motion = _rl_vi_last_motion;
27 r = rl_domove_motion_callback (_rl_vimvcxt);
29 #if defined (READLINE_CALLBACKS)
30 else if (RL_ISSTATE (RL_STATE_CALLBACK))
32 r = rl_domove_motion_callback (_rl_vimvcxt);
34 ! else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */
36 _rl_vimvcxt->motion = _rl_vi_last_motion;
37 r = rl_domove_motion_callback (_rl_vimvcxt);
39 + else if (vi_redoing) /* handle redoing `dd' here */
41 + _rl_vimvcxt->motion = _rl_vi_last_motion;
43 + rl_beg_of_line (1, key);
44 + RL_UNSETSTATE (RL_STATE_VIMOTION);
45 + r = vidomove_dispatch (_rl_vimvcxt);
47 #if defined (READLINE_CALLBACKS)
48 else if (RL_ISSTATE (RL_STATE_CALLBACK))
51 r = rl_domove_motion_callback (_rl_vimvcxt);
53 ! else if (vi_redoing)
55 _rl_vimvcxt->motion = _rl_vi_last_motion;
56 r = rl_domove_motion_callback (_rl_vimvcxt);
58 #if defined (READLINE_CALLBACKS)
59 else if (RL_ISSTATE (RL_STATE_CALLBACK))
61 r = rl_domove_motion_callback (_rl_vimvcxt);
63 ! else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */
65 _rl_vimvcxt->motion = _rl_vi_last_motion;
66 r = rl_domove_motion_callback (_rl_vimvcxt);
68 + else if (vi_redoing) /* handle redoing `cc' here */
70 + _rl_vimvcxt->motion = _rl_vi_last_motion;
72 + rl_beg_of_line (1, key);
73 + RL_UNSETSTATE (RL_STATE_VIMOTION);
74 + r = vidomove_dispatch (_rl_vimvcxt);
76 #if defined (READLINE_CALLBACKS)
77 else if (RL_ISSTATE (RL_STATE_CALLBACK))
81 r = rl_domove_motion_callback (_rl_vimvcxt);
83 + else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */
85 + _rl_vimvcxt->motion = _rl_vi_last_motion;
86 + r = rl_domove_motion_callback (_rl_vimvcxt);
88 + else if (vi_redoing) /* handle redoing `yy' here */
90 + _rl_vimvcxt->motion = _rl_vi_last_motion;
92 + rl_beg_of_line (1, key);
93 + RL_UNSETSTATE (RL_STATE_VIMOTION);
94 + r = vidomove_dispatch (_rl_vimvcxt);
96 #if defined (READLINE_CALLBACKS)
97 else if (RL_ISSTATE (RL_STATE_CALLBACK))
98 *** ../readline-6.2-patched/patchlevel 2010-01-14 10:15:52.000000000 -0500
99 --- patchlevel 2011-11-17 11:09:35.000000000 -0500
102 # Do not edit -- exists only for use by patch
106 # Do not edit -- exists only for use by patch