From 218ab23b01787b061e7e3c8e13bc292552209d37 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Sat, 4 Jan 2003 10:15:25 +0000 Subject: [PATCH] Fixed thread tree building in some cases --- golded3/gemlst.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/golded3/gemlst.cpp b/golded3/gemlst.cpp index fab1276..8b5dd8a 100644 --- a/golded3/gemlst.cpp +++ b/golded3/gemlst.cpp @@ -865,6 +865,7 @@ void GThreadlist::print_line(uint idx, uint pos, bool isbar) { strftimei(dbuf, 20, "%d %b %y", gmtime(&dt)); strcat(buf, dbuf); } + strcat(buf, " "); window.prints(pos, 0, isbar ? sattr : attrw, buf); window.prints(pos, 6, isbar ? sattr : hattr, marks); @@ -949,13 +950,19 @@ void GThreadlist::BuildThreadIndex(dword msgn) { AA->LoadHdr(&msg, msgn); ulong msgno = msg.link.to(); + ulong prevmsgno = msgn; // Search backwards while(AA->Msgn.ToReln(msgno)) { - if(not AA->LoadHdr(&msg, msgno)) + if(not AA->LoadHdr(&msg, msgno)) { msg.link.to_set(0); + msgno = prevmsgno; + AA->LoadHdr(&msg, msgno); + break; + } + prevmsgno = msgno; msgno = msg.link.to(); }