diff options
| author | Tom Feist <shabble@metavore.org> | 2010-09-30 23:12:41 +0000 | 
|---|---|---|
| committer | Tom Feist <shabble@metavore.org> | 2010-09-30 23:12:41 +0000 | 
| commit | a916626f1db1d414bc73391ed5c332af8ff8e52e (patch) | |
| tree | 93d4059426309a53cb3d8adef66526ce3a76b54b | |
| parent | Merge remote branch 'origin/dev' (diff) | |
| download | irssi-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.pl | 12 | 
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 | 
