diff options
author | Simon Ruderich <simon@ruderich.org> | 2010-10-03 00:14:04 +0000 |
---|---|---|
committer | Simon Ruderich <simon@ruderich.org> | 2010-10-03 00:14:04 +0000 |
commit | 0fce5db1b81aa23a18ce3596b42cbfdad42c88d6 (patch) | |
tree | 561ee4bd9aa8d0124fa169ca336fe071c706b081 /vim-mode | |
parent | vim_mode: Fix caw. (diff) | |
download | irssi-scripts-0fce5db1b81aa23a18ce3596b42cbfdad42c88d6.tar.gz irssi-scripts-0fce5db1b81aa23a18ce3596b42cbfdad42c88d6.zip |
vim_mode: Only undo operators, repeatable movements and repetitions.
Diffstat (limited to 'vim-mode')
-rw-r--r-- | vim-mode/vim_mode.pl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 8a6a2ab..3982c93 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -1670,11 +1670,10 @@ sub handle_command_cmd { my $cur_pos = _input_pos(); - # save an undo checkpoint here. - - if ($char ne 'u' && $char ne "\x12" && $char ne "\x04" - && $char ne 'j' && $char ne 'k') { - + # Save an undo checkpoint here for operators, all repeatable + # movements, operators and repetition. + if (defined $operator or exists $movements_repeatable->{$char} or + $char eq '.') { # TODO: why do histpry entries still show up in undo # buffer? Is avoiding the commands here insufficient? |