]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
[inputlength] Fix indentation inconsistencies
authorGeorgios Kontaxis <redacted>
Sat, 15 Aug 2026 17:31:52 +0000 (17:31 +0000)
committerGeorgios Kontaxis <redacted>
Sat, 15 Aug 2026 17:31:52 +0000 (17:31 +0000)
scripts/il.pl

index b7dd34260c3828cd043b07f8bddabcf455583bb2..0f5574d929d305a4d69ede5f021140ac1c6dfef5 100644 (file)
@@ -3,27 +3,27 @@
 #   inputlength = "{sb length: $@L}";
 #
 #  with leading spaces: (3 spaces in example)
-#    inputlength = "{sb $[-!3]@L}"; 
+#    inputlength = "{sb $[-!3]@L}";
 #
 #  with leading char "-"
 #
-#    inputlength = "{sb $[-!3-]@L}"; 
+#    inputlength = "{sb $[-!3-]@L}";
 #
-#   you cant use numbers here. if you want to use the numbers use the 
+#   you cant use numbers here. if you want to use the numbers use the
 #   perl script
 #
 #
 # thanks to: Wouter Coekaerts <wouter@coekaerts.be> aka coekie
 #
 # add one of these 2 lines to your config in statusbar items section
-# 
-# the perl scripts  reacts on every keypress and updates the counter. 
+#
+# the perl scripts  reacts on every keypress and updates the counter.
 # if you dont need/want this the settings are maybe enough for you.
 # with the settings the item is update with a small delay.
 #
 
 use strict;
-use Irssi 20021105; 
+use Irssi 20021105;
 use Irssi::TextUI;
 
 use vars qw($VERSION %IRSSI);
@@ -57,25 +57,25 @@ my $help = << "END";
 END
 
 sub beancounter {
-    my ( $sbItem, $get_size_only ) = @_;
+       my ( $sbItem, $get_size_only ) = @_;
 
-    my ( $width, $padChar, $padNum, $length ); 
+       my ( $width, $padChar, $padNum, $length );
 
        #
        # getting settings
        #
-    $width = Irssi::settings_get_int ( 'inputlength_width' );
+       $width = Irssi::settings_get_int ( 'inputlength_width' );
        $padChar = Irssi::settings_get_str ( 'inputlength_padding_char' );
 
        #
        # only one char allowed
        #
-    $padChar =~ s/^(.).*?$/$1/;
+       $padChar =~ s/^(.).*?$/$1/;
 
        #
        # do we have to deal wit numbers for padding?
-    #  
-    if ( $padChar =~ m/\d/ ) {
+       #
+       if ( $padChar =~ m/\d/ ) {
                $padNum = $padChar;
                $padChar = '-';
        };
@@ -88,31 +88,31 @@ sub beancounter {
        #
        # did we have a number?
        #
-    $length =~ s/$padChar/$padNum/g if ( $padNum ne '' );
+       $length =~ s/$padChar/$padNum/g if ( $padNum ne '' );
 
-    $sbItem->default_handler ( $get_size_only, "{sb $length}", undef, 1 );
+       $sbItem->default_handler ( $get_size_only, "{sb $length}", undef, 1 );
 }
 
 Irssi::statusbar_item_register ( 'inputlength', 0, 'beancounter' );
 #
 # ToDo:
-#  - statusbar item register doesnt support function references. 
+#  - statusbar item register doesnt support function references.
 #    so we have to stuck to the string and wait for cras.
 #
 
 Irssi::signal_add_last 'gui key pressed' => sub {
-    Irssi::statusbar_items_redraw ( 'inputlength' );
+       Irssi::statusbar_items_redraw ( 'inputlength' );
 };
 
 Irssi::settings_add_int ( 'inputlength', 'inputlength_width', 0 );
 #
 # setting:
-# 
+#
 # 0 means it resizes automatically
 # greater means it has at least a size of n chars.
 # it will grow if the space is to space is too small
 #
+
 Irssi::settings_add_str ( 'inputlength', 'inputlength_padding_char', " " );
 #
 # char to pad with
git clone https://git.99rst.org/PROJECT