diff options
Diffstat (limited to 'sb-position')
-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; |