aboutsummaryrefslogtreecommitdiffstats
path: root/lib/readline
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2012-07-17 09:48:15 -0400
committerChet Ramey <chet.ramey@case.edu>2012-07-17 09:48:15 -0400
commit15be0ec466ca25d1c87d7e6ddd576ced34705fc0 (patch)
tree1a2b15d131da77346f40cf5a08827f7970adf434 /lib/readline
parent0b913689b8d913c98b193607870713832935e07d (diff)
downloadandroid_external_bash-15be0ec466ca25d1c87d7e6ddd576ced34705fc0.tar.gz
android_external_bash-15be0ec466ca25d1c87d7e6ddd576ced34705fc0.tar.bz2
android_external_bash-15be0ec466ca25d1c87d7e6ddd576ced34705fc0.zip
Bash-4.2 patch 37
Diffstat (limited to 'lib/readline')
-rw-r--r--lib/readline/vi_mode.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/lib/readline/vi_mode.c b/lib/readline/vi_mode.c
index a3c3578..4408053 100644
--- a/lib/readline/vi_mode.c
+++ b/lib/readline/vi_mode.c
@@ -1234,11 +1234,19 @@ rl_vi_delete_to (count, key)
_rl_vimvcxt->motion = '$';
r = rl_domove_motion_callback (_rl_vimvcxt);
}
- else if (vi_redoing)
+ else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */
{
_rl_vimvcxt->motion = _rl_vi_last_motion;
r = rl_domove_motion_callback (_rl_vimvcxt);
}
+ else if (vi_redoing) /* handle redoing `dd' here */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ rl_mark = rl_end;
+ rl_beg_of_line (1, key);
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+ r = vidomove_dispatch (_rl_vimvcxt);
+ }
#if defined (READLINE_CALLBACKS)
else if (RL_ISSTATE (RL_STATE_CALLBACK))
{
@@ -1316,11 +1324,19 @@ rl_vi_change_to (count, key)
_rl_vimvcxt->motion = '$';
r = rl_domove_motion_callback (_rl_vimvcxt);
}
- else if (vi_redoing)
+ else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */
{
_rl_vimvcxt->motion = _rl_vi_last_motion;
r = rl_domove_motion_callback (_rl_vimvcxt);
}
+ else if (vi_redoing) /* handle redoing `cc' here */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ rl_mark = rl_end;
+ rl_beg_of_line (1, key);
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+ r = vidomove_dispatch (_rl_vimvcxt);
+ }
#if defined (READLINE_CALLBACKS)
else if (RL_ISSTATE (RL_STATE_CALLBACK))
{
@@ -1377,6 +1393,19 @@ rl_vi_yank_to (count, key)
_rl_vimvcxt->motion = '$';
r = rl_domove_motion_callback (_rl_vimvcxt);
}
+ else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+ else if (vi_redoing) /* handle redoing `yy' here */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ rl_mark = rl_end;
+ rl_beg_of_line (1, key);
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+ r = vidomove_dispatch (_rl_vimvcxt);
+ }
#if defined (READLINE_CALLBACKS)
else if (RL_ISSTATE (RL_STATE_CALLBACK))
{