summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorailin-nemui2015-12-08 20:46:03 +0100
committerailin-nemui2015-12-08 20:46:03 +0100
commitdced8f40460379cbc26956c7b7a5c06791497891 (patch)
treef9229695cd3d15d812721f1e38438d74c554b679 /scripts
parent742b70077dde2718697f0a650ff61c014079a9b7 (diff)
parent6cfee255ae923dde8eb519c894e114f5eba2f355 (diff)
downloadscripts.irssi.org-dced8f40460379cbc26956c7b7a5c06791497891.tar.bz2
Merge pull request #202 from mh-source/gh-pages
mh_windowfill.pl v1.05
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mh_windowfill.pl16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/mh_windowfill.pl b/scripts/mh_windowfill.pl
index 770f538..550d239 100644
--- a/scripts/mh_windowfill.pl
+++ b/scripts/mh_windowfill.pl
@@ -1,6 +1,6 @@
##############################################################################
#
-# mh_windowfill.pl v1.04 (20151128)
+# mh_windowfill.pl v1.05 (20151206)
#
# Copyright (c) 2015 Michael Hansen
#
@@ -27,6 +27,8 @@
# with script: http://picpaste.com/e3b84ead852e3e77b12ed69383f1f80c.png
#
# history:
+# v1.05 (20151206)
+# added a few comments
# v1.04 (20151128)
# call windowfill* directly from signals
# removed on load timeout
@@ -56,7 +58,7 @@ use strict;
use Irssi 20100403;
use Irssi::TextUI;
-our $VERSION = '1.04';
+our $VERSION = '1.05';
our %IRSSI =
(
'name' => 'mh_windowfill',
@@ -103,6 +105,9 @@ sub windowfill
my $line = $window->view()->get_lines();
my $linecount = 0;
+ #
+ # count lines we need to move
+ #
while ($line)
{
$linecount++;
@@ -113,6 +118,9 @@ sub windowfill
$line = $window->view()->get_lines();
+ #
+ # move lines down
+ #
while ($linecount)
{
my $linetext = $line->get_text(1);
@@ -154,13 +162,13 @@ sub command_clear
#
##############################################################################
+windowfill_all();
+
Irssi::signal_add_last('mainwindow resized', 'windowfill_all');
Irssi::signal_add_last('window created', 'windowfill');
Irssi::command_bind('clear', 'command_clear');
-windowfill_all();
-
1;
##############################################################################