From a916626f1db1d414bc73391ed5c332af8ff8e52e Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 1 Oct 2010 00:12:41 +0100 Subject: more fixing to undo, weird bug that C-d would make it work when it shouldn't. --- vim-mode/vim_mode.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 5e5096d..28a6383 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -308,28 +308,28 @@ my $movements_multiple = sub cmd_undo { print "Undo!" if DEBUG; + _restore_undo_entry($undo_index); + print "Undoing entry index: $undo_index of " . scalar(@undo_buffer) if DEBUG; if ($undo_index != $#undo_buffer) { $undo_index++; } else { print "No further undo." if DEBUG; } - print "Undoing entry index: $undo_index of " . scalar(@undo_buffer) if DEBUG; - _restore_undo_entry($undo_index); } sub cmd_redo { print "Redo!" if DEBUG; + print "Undoing entry index: $undo_index of " . scalar(@undo_buffer) if DEBUG; + + _restore_undo_entry($undo_index); if ($undo_index != 0) { $undo_index--; } else { print "No further Redo." if DEBUG; } - print "Undoing entry index: $undo_index of " . scalar(@undo_buffer) if DEBUG; - - _restore_undo_entry($undo_index); } sub cmd_operator_c { @@ -1300,7 +1300,7 @@ sub handle_command_cmd { # save an undo checkpoint here. - if ($char ne 'u' && $char ne "\x12" + if ($char ne 'u' && $char ne "\x12" && $char ne "\x04" && $char ne 'j' && $char ne 'k') { # TODO: why do histpry entries still show up in undo -- cgit v1.2.3