aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.pl
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-10-03 00:14:04 +0000
committerSimon Ruderich <simon@ruderich.org>2010-10-03 00:14:04 +0000
commit0fce5db1b81aa23a18ce3596b42cbfdad42c88d6 (patch)
tree561ee4bd9aa8d0124fa169ca336fe071c706b081 /vim-mode/vim_mode.pl
parentvim_mode: Fix caw. (diff)
downloadirssi-scripts-0fce5db1b81aa23a18ce3596b42cbfdad42c88d6.tar.gz
irssi-scripts-0fce5db1b81aa23a18ce3596b42cbfdad42c88d6.zip
vim_mode: Only undo operators, repeatable movements and repetitions.
Diffstat (limited to 'vim-mode/vim_mode.pl')
-rw-r--r--vim-mode/vim_mode.pl9
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?