From 7f0cebd0197ebfd93d6b9c7c9f58c7dd10581e9f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 10 Oct 2010 18:45:08 +0200 Subject: vim_mode: Fix pasting registers containing only "0". Reported by estragib. --- vim-mode/vim_mode.pl | 4 ++-- 1 file 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); } -- cgit v1.2.3