diff options
author | Chet Ramey <chet.ramey@case.edu> | 2012-07-17 09:48:15 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2012-07-17 09:48:15 -0400 |
commit | 15be0ec466ca25d1c87d7e6ddd576ced34705fc0 (patch) | |
tree | 1a2b15d131da77346f40cf5a08827f7970adf434 | |
parent | 0b913689b8d913c98b193607870713832935e07d (diff) | |
download | bash-15be0ec466ca25d1c87d7e6ddd576ced34705fc0.tar.gz |
Bash-4.2 patch 37
-rw-r--r-- | lib/readline/vi_mode.c | 33 | ||||
-rw-r--r-- | patchlevel.h | 2 |
2 files changed, 32 insertions, 3 deletions
diff --git a/lib/readline/vi_mode.c b/lib/readline/vi_mode.c index a3c35786..4408053f 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)) { diff --git a/patchlevel.h b/patchlevel.h index 98684819..4e51dbc9 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 36 +#define PATCHLEVEL 37 #endif /* _PATCHLEVEL_H_ */ |