aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.pl
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-10-15 22:15:00 +0000
committerSimon Ruderich <simon@ruderich.org>2010-10-15 22:15:00 +0000
commitb97a6b5a400a7cb6eb921d529aa8bce6eca0e6cf (patch)
treebd38905404aba483808a6a867858eb2aa2c36d12 /vim-mode/vim_mode.pl
parentvim_mode: Hopefully fix undo/redo with 'start_cmd'. (diff)
downloadirssi-scripts-b97a6b5a400a7cb6eb921d529aa8bce6eca0e6cf.tar.gz
irssi-scripts-b97a6b5a400a7cb6eb921d529aa8bce6eca0e6cf.zip
vim_mode: Fix undo for cc/yy.
Reported by estragib.
Diffstat (limited to 'vim-mode/vim_mode.pl')
-rw-r--r--vim-mode/vim_mode.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 045ae80..2c7e744 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -2372,6 +2372,9 @@ sub handle_command_cmd {
# Restore position for yy.
if ($cmd == $commands->{y}) {
_input_pos($pos);
+ # And save undo for other operators.
+ } else {
+ _add_undo_entry(_input(), _input_pos());
}
if ($register ne '"') {
print 'Changing register to "' if DEBUG;