diff options
author | Tom Feist <shabble@metavore.org> | 2010-09-30 20:08:04 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2010-09-30 20:08:04 +0000 |
commit | 8b72bce555be87822bd5ff37ead74931f4e046b2 (patch) | |
tree | be39aa2844ebd5c8f8b64a2905d686873062dcdf /vim-mode/vim_mode.pl | |
parent | thanks to rudi_s for pointing out what a ternary operator looks like. (diff) | |
download | irssi-scripts-8b72bce555be87822bd5ff37ead74931f4e046b2.tar.gz irssi-scripts-8b72bce555be87822bd5ff37ead74931f4e046b2.zip |
renamed $ratio for some more 'my masks ... scope' weirdness in 5.8.9
Diffstat (limited to '')
-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 1da40c0..40a5a14 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -921,10 +921,10 @@ sub _matching_windows { foreach my $window (Irssi::windows()) { # Matching window names. if ($window->{name} =~ /$buffer/i) { - my $ratio = ($+[0] - $-[0]) / length($window->{name}); + my $win_ratio = ($+[0] - $-[0]) / length($window->{name}); push @matches, { window => $window, item => undef, - ratio => $ratio, + ratio => $win_ratio, text => $window->{name} }; print ":b $window->{name}: $ratio" if DEBUG; } @@ -938,10 +938,10 @@ sub _matching_windows { if ($item->{name} =~ /$buffer/i) { my $length = length($item->{name}); $length-- if index($item->{name}, '#') == 0; - my $ratio = ($+[0] - $-[0]) / $length; + my $item_ratio = ($+[0] - $-[0]) / $length; push @matches, { window => $window, item => $item, - ratio => $ratio, + ratio => $item_ratio, text => $item->{name} }; print ":b $window->{name} $item->{name}: $ratio" if DEBUG; } |