From cdf59136a4f34ecfbbe459789cf568ac21328804 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 20 Jan 2015 00:27:25 +0100 Subject: weechat: iset.pl: 3.5 → 3.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weechat/perl/iset.pl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'weechat') diff --git a/weechat/perl/iset.pl b/weechat/perl/iset.pl index cc2b28d..f179022 100644 --- a/weechat/perl/iset.pl +++ b/weechat/perl/iset.pl @@ -19,6 +19,8 @@ # # History: # +# 2014-09-30, arza : +# version 3.6: fix current line counter when options aren't found # 2014-06-03, nils_2 : # version 3.5: add new option "use_mute" # 2014-01-30, stfn : @@ -115,7 +117,7 @@ use strict; my $PRGNAME = "iset"; -my $VERSION = "3.5"; +my $VERSION = "3.6"; my $DESCR = "Interactive Set for configuration options"; my $AUTHOR = "Sebastien Helleu "; my $LICENSE = "GPL3"; @@ -155,7 +157,17 @@ sub iset_title if ($iset_buffer ne "") { my $current_line_counter = ""; - $current_line_counter = ($current_line + 1) . "/" if (weechat::config_boolean($options_iset{"show_current_line"}) == 1); + if (weechat::config_boolean($options_iset{"show_current_line"}) == 1) + { + if (@options_names eq 0) + { + $current_line_counter = "0/"; + } + else + { + $current_line_counter = ($current_line + 1) . "/"; + } + } my $show_filter = ""; if ($search_mode eq 0) { -- cgit v1.2.3-70-g09d2