summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2012-07-17 09:54:36 -0400
committerChet Ramey <chet.ramey@case.edu>2012-07-17 09:54:36 -0400
commit385b20264ab15a1713908def2f8d735750abbf19 (patch)
treecb99fe2ae3658d64a50c5d137923f253ba000339
parente8b937f06bb4a88d68e96c81f63ead20892ea9b8 (diff)
downloadreadline-385b20264ab15a1713908def2f8d735750abbf19.tar.gz
Readline-6.2 patch 4
-rw-r--r--patchlevel2
-rw-r--r--vi_mode.c33
2 files changed, 32 insertions, 3 deletions
diff --git a/patchlevel b/patchlevel
index ce3e355..626a945 100644
--- a/patchlevel
+++ b/patchlevel
@@ -1,3 +1,3 @@
# Do not edit -- exists only for use by patch
-3
+4
diff --git a/vi_mode.c b/vi_mode.c
index a3c3578..4408053 100644
--- a/vi_mode.c
+++ b/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))
{