diff options
author | Tom Feist <shabble@metavore.org> | 2010-12-02 01:54:59 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2010-12-02 01:54:59 +0000 |
commit | b32bdd9d958cf15e9c4df175d7d3fea3276b51f1 (patch) | |
tree | db6b4234d1c98c1723b52db408acdda9e9329a4a | |
parent | sb_position: moved register and sig code into init(), weird hacky bugfix for ... (diff) | |
download | irssi-scripts-b32bdd9d958cf15e9c4df175d7d3fea3276b51f1.tar.gz irssi-scripts-b32bdd9d958cf15e9c4df175d7d3fea3276b51f1.zip |
sb_position: /sb commands now work and cause the update as expected
-rw-r--r-- | sb-position/sb_position.pl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sb-position/sb_position.pl b/sb-position/sb_position.pl index 61e5978..744229f 100644 --- a/sb-position/sb_position.pl +++ b/sb-position/sb_position.pl @@ -50,13 +50,20 @@ sub init { Irssi::statusbar_item_register('position', 0, 'position_statusbar'); Irssi::signal_add("window changed", \&update_position); - Irssi::signal_add_last("command clear", \&update_position); - Irssi::signal_add_last("command scrollback", \&update_position); + Irssi::signal_add_last("command clear", \&update_cmd_shim); + Irssi::signal_add_last("command scrollback", \&update_cmd_shim); # Irssi::signal_add_last("gui print text finished", sig_statusbar_more_updated); update_position(Irssi::active_win()); } +sub update_cmd_shim { + my ($cmd, $server, $witem) = @_; + return unless $witem; + my $win = $witem->window; + update_position($win); +} + sub update_position { my $win = shift; |