diff options
author | Simon Ruderich <simon@ruderich.org> | 2010-09-26 19:56:25 +0000 |
---|---|---|
committer | Simon Ruderich <simon@ruderich.org> | 2010-09-26 19:56:25 +0000 |
commit | 79a1d6bc2fd48ee2d1e12e7e7728485ea8ee1267 (patch) | |
tree | 078672324a23e1567ebb19f7fc7b386c27f41651 | |
parent | added a bunch of TODO items based on feedback from #irssi. (diff) | |
download | irssi-scripts-79a1d6bc2fd48ee2d1e12e7e7728485ea8ee1267.tar.gz irssi-scripts-79a1d6bc2fd48ee2d1e12e7e7728485ea8ee1267.zip |
vim_mode: d/c copies deleted string to " register.
-rw-r--r-- | vim-mode/vim_mode.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 04d614d..57cddef 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -202,8 +202,9 @@ sub cmd_operator_d { # Remove the selected string from the input. my $input = _input(); - substr $input, $pos, $length, ''; + $registers->{'"'} = substr $input, $pos, $length, ''; _input($input); + print "Deleted: " . $registers->{'"'} if DEBUG; # Move the cursor at the right position. _input_pos($pos); @@ -215,9 +216,8 @@ sub cmd_operator_y { # Extract the selected string and put it in the " register. my $input = _input(); - my $string = substr $input, $pos, $length; - $registers->{'"'} = $string; - print "Yanked: $string" if DEBUG; + $registers->{'"'} = substr $input, $pos, $length; + print "Yanked: " . $registers->{'"'} if DEBUG; _input_pos($old_pos); } |