From 24e5c976f22715db9f8f90b7fd439b064001b4ee Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Mon, 13 Dec 2010 05:40:49 +0000 Subject: ido_switch: only use levelclear when necessary (after something has been printed) --- ido-mode/ido_switcher.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ido-mode') diff --git a/ido-mode/ido_switcher.pl b/ido-mode/ido_switcher.pl index 291d07f..e1b684a 100644 --- a/ido-mode/ido_switcher.pl +++ b/ido-mode/ido_switcher.pl @@ -77,6 +77,7 @@ my $match_index = 0; my $search_str = ''; my $active_only = 0; +my $need_clear = 0; # /set configurable settings my $ido_show_count; @@ -96,6 +97,7 @@ sub MODE_W () { 4 } # select window sub _print { my $win = Irssi::active_win; my $str = join('', @_); + $need_clear = 1; $win->print($str, Irssi::MSGLEVEL_NEVER); } @@ -106,6 +108,7 @@ sub _debug_print { } sub _print_clear { + return unless $need_clear; my $win = Irssi::active_win(); $win->command('/scrollback levelclear -level NEVER'); } -- cgit v1.2.3