diff --git a/golded3/geedit2.cpp b/golded3/geedit2.cpp index 8c6fcfa..5a90e7f 100644 --- a/golded3/geedit2.cpp +++ b/golded3/geedit2.cpp @@ -858,6 +858,8 @@ void IEclass::LoadFile() { for(i=0; l->next and inext; + if(l->next == NULL) + row = i; currline = l; col = mincol; diff --git a/golded3/gemlst.cpp b/golded3/gemlst.cpp index 8c5dfa8..3cf5237 100644 --- a/golded3/gemlst.cpp +++ b/golded3/gemlst.cpp @@ -26,6 +26,8 @@ #include #include +#include +#include // ------------------------------------------------------------------ @@ -616,6 +618,8 @@ public: ulong replyto; ulong reply1st; ulong replynext; + ulong replytoindex; + ulong level; }; #define MAX_LEVEL 20 @@ -631,8 +635,8 @@ private: uint h_offset; void BuildThreadIndex(dword msgno); - void recursive_build(ulong msgn, ulong rn); - void GenTree(char* buf2, int idx); + void recursive_build(ulong msgn, ulong rn, ulong level); + void GenTree(char* buf2, int idx, ulong maxlev); void update_title(); bool NextThread(bool next); @@ -723,7 +727,7 @@ void GThreadlist::close() { // ------------------------------------------------------------------ -void GThreadlist::GenTree(char* buf, int idx) { +void GThreadlist::GenTree(char* buf, int idx, ulong maxlev) { #ifdef KOI8 static char graph[4]=""; @@ -742,36 +746,30 @@ void GThreadlist::GenTree(char* buf, int idx) { } #endif - t = list[idx]; + ThreadEntry te = list[idx]; - uint level = 0; - char* q = &buf[1000]; + buf[0] = ' '; - *q-- = NUL; - *q-- = ' '; - *q-- = (t.replynext) ? graph[0] : graph[1]; + if(te.level == 0) { + buf[1] = NUL; + return; + } - while(t.replyto) { - for(uint i=0; iMsgn.ToReln(t.replyto)) t.replyto = 0; @@ -894,6 +895,7 @@ void GThreadlist::recursive_build(ulong msgn, ulong rn) { bool found = false; for(j=0; j