aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2010-09-30 23:12:41 +0000
committerTom Feist <shabble@metavore.org>2010-09-30 23:12:41 +0000
commita916626f1db1d414bc73391ed5c332af8ff8e52e (patch)
tree93d4059426309a53cb3d8adef66526ce3a76b54b
parentMerge remote branch 'origin/dev' (diff)
downloadirssi-scripts-a916626f1db1d414bc73391ed5c332af8ff8e52e.tar.gz
irssi-scripts-a916626f1db1d414bc73391ed5c332af8ff8e52e.zip
more fixing to undo, weird bug that C-d would make it work when it shouldn't.
-rw-r--r--vim-mode/vim_mode.pl12
1 files 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