aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-10-10 16:45:08 +0000
committerSimon Ruderich <simon@ruderich.org>2010-10-10 16:45:08 +0000
commit7f0cebd0197ebfd93d6b9c7c9f58c7dd10581e9f (patch)
tree0d24b834359855ef1775ede90e4ca20a1fb64616
parentvim_mode: Correctly display pending text-objects. (diff)
downloadirssi-scripts-7f0cebd0197ebfd93d6b9c7c9f58c7dd10581e9f.tar.gz
irssi-scripts-7f0cebd0197ebfd93d6b9c7c9f58c7dd10581e9f.zip
vim_mode: Fix pasting registers containing only "0".
Reported by estragib.
Diffstat (limited to '')
-rw-r--r--vim-mode/vim_mode.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 3dbdebc..20562a7 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -561,7 +561,7 @@ sub insert_ctrl_r {
my ($key) = @_;
my $char = chr($key);
- return if not defined $registers->{$char} or not $registers->{$char};
+ return if not defined $registers->{$char} or $registers->{$char} eq '';
my $pos = _insert_at_position($registers->{$char}, 1, _input_pos());
_input_pos($pos + 1);
@@ -1329,7 +1329,7 @@ sub cmd_P {
sub _paste_at_position {
my ($count, $pos) = @_;
- return if not $registers->{$register};
+ return if $registers->{$register} eq '';
return _insert_at_position($registers->{$register}, $count, $pos);
}