From 3a1a8810c86564e4831d4d5bf468c00af2278b87 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 4 Oct 2010 00:40:23 +0100 Subject: [PATCH] ypp-chatlog-alerter: when replacing, always delete the row and shuffle others up --- ypp-chatlog-alerter | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ypp-chatlog-alerter b/ypp-chatlog-alerter index fb6bba7..2f6d86e 100755 --- a/ypp-chatlog-alerter +++ b/ypp-chatlog-alerter @@ -270,7 +270,7 @@ puts "MESSAGE $l" } proc message {pirate msg} { - global times pirates messages + global times pirates messages height global lw_ls lw_ws set ix [lsearch -exact $pirates $pirate] @@ -285,6 +285,13 @@ proc message {pirate msg} { } incr cix } + for_lw { + set $l [lreplace [set $l] $ix $ix] + lappend $l {} + $w delete $ix + $w insert end {} + } + set ix [expr {$height-1}] } for_lw new [list $now $pirate $msg] { set $l [lreplace [set $l] $ix $ix $new] -- 2.30.2