tii

Tcl-based suite for working with ii/idec protocol
git clone git://git.luxferre.top/tii.git
Log | Files | Refs | README

commit 8995621f4a1988a588a3c7fded914a18de08aac9
parent 7a5c03510b30b4599823f7d7b66c2c98a0c678b0
Author: Luxferre <lux@ferre>
Date:   Wed, 23 Oct 2024 15:33:58 +0300

msglist fetch fixes

Diffstat:
Mtiifetch.tcl | 8+++-----
Mtiix.tcl | 5+----
2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/tiifetch.tcl b/tiifetch.tcl @@ -232,11 +232,9 @@ proc fetchiidb {url echos dbdir dolog} { set oldmsgids [lmap s [split [readfile $echofile] "\n"] {string trim $s}] } # pre-filter the new message IDs to fetch - set newmsgids [lmap m [concat $oldmsgids $msgids] { - if {$m in $oldmsgids && $m in $msgids} continue - if {$m eq {}} continue - set m - }] + set newmsgids [concat $oldmsgids $msgids] + foreach e $newmsgids {dict set tmp $e 1} + set newmsgids [dict keys $tmp] # save the echo index file with all message IDs writefileln $echofile [join $msgids "\n"] if {$dolog eq 1} {puts "Fetching [llength $newmsgids] new messages from $echoname..."} diff --git a/tiix.tcl b/tiix.tcl @@ -356,12 +356,9 @@ grid .tabbar.p.addrframe.subj -column 3 -row 1 -columnspan 3 -sticky we grid .tabbar.p.addrframe.reptolbl -column 4 -row 0 -sticky nsw grid .tabbar.p.addrframe.repto -column 5 -row 0 grid .tabbar.p.addrframe.send -column 6 -rowspan 2 -row 0 -sticky nswe - grid rowconfigure .tabbar.p.addrframe 0 -pad 2 grid columnconfigure .tabbar.p.addrframe 6 -weight 1 grid .tabbar.p.addrframe -column 0 -row 0 -sticky nws -pady 2 - - ttk::frame .tabbar.p.content tk::text .tabbar.p.content.text -cursor $contentcursor -yscrollcommand ".tabbar.p.content.yscroll set" -wrap word \ -font tiix_font -foreground $tiix_fgcolor -background $tiix_bgcolor -insertbackground $tiix_fgcolor -state normal @@ -380,7 +377,7 @@ grid rowconfigure .tabbar.p 1 -weight 1 # general keybinding switch -bind . <Key> { +bind .tabbar.r.content.text <Key> { if {$tiix_entry eq 0} { switch "%K" { Prior -