aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-10-03 02:19:58 +0000
committerSimon Ruderich <simon@ruderich.org>2010-10-03 02:19:58 +0000
commitbdf88c3d8a0ad522a1e2be73e08f4c4c81745787 (patch)
treeb5e6682a8f886db2fbbed67a412d3d080bb4a345
parentvim_mode: Undo only tracks d operators. (diff)
downloadirssi-scripts-bdf88c3d8a0ad522a1e2be73e08f4c4c81745787.tar.gz
irssi-scripts-bdf88c3d8a0ad522a1e2be73e08f4c4c81745787.zip
vim_mode: Only track input positions for d operator.
-rw-r--r--vim-mode/vim_mode.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 60746f2..512a281 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -1706,8 +1706,8 @@ sub handle_command_cmd {
# Update input position of last undo entry so that undo/redo
# restores correct position.
if (@undo_buffer and _input() eq $undo_buffer[0]->[0] and
- (defined $operator or exists $movements_repeatable->{$char} or
- $char eq '.')) {
+ ((defined $operator and $operator eq 'd') or
+ exists $movements_repeatable->{$char} or $char eq '.')) {
print "Updating history position: $undo_buffer[0]->[0]"
if DEBUG;
$undo_buffer[0]->[1] = $cur_pos;