aboutsummaryrefslogtreecommitdiffstats
path: root/ido-mode/ido_switcher.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2010-12-13 05:40:49 +0000
committerTom Feist <shabble@metavore.org>2010-12-13 05:40:49 +0000
commit24e5c976f22715db9f8f90b7fd439b064001b4ee (patch)
tree228a57f4a683115583fb8a1afff214c1f5c8c160 /ido-mode/ido_switcher.pl
parentido_switch: SPC jumps to window without exiting mode, RET no longer sends (diff)
downloadirssi-scripts-24e5c976f22715db9f8f90b7fd439b064001b4ee.tar.gz
irssi-scripts-24e5c976f22715db9f8f90b7fd439b064001b4ee.zip
ido_switch: only use levelclear when necessary (after something has been printed)
Diffstat (limited to '')
-rw-r--r--ido-mode/ido_switcher.pl3
1 files changed, 3 insertions, 0 deletions
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');
}