acme/Mail: correct message line number for partially hidden threads

This commit is contained in:
Ori Bernstein 2024-12-15 21:56:54 +00:00
parent f86cc3e912
commit eff4b93652

View file

@ -159,8 +159,9 @@ nsub(Mesg *m)
n = 0; n = 0;
for(i = 0; i < m->nchild; i++){ for(i = 0; i < m->nchild; i++){
c = m->child[i]; c = m->child[i];
n += nsub(c);
if(!(c->state & (Sdummy|Shide))) if(!(c->state & (Sdummy|Shide)))
n += nsub(c)+1; n++;
} }
return n; return n;
} }
@ -183,7 +184,9 @@ mesglineno(Mesg *msg, int *depth)
for(i = 0; i < p->nchild; i++){ for(i = 0; i < p->nchild; i++){
if(p->child[i] == m) if(p->child[i] == m)
break; break;
o += nsub(p->child[i]) + 1; o += nsub(p->child[i]);
if(!(p->state & (Sdummy|Shide)))
o++;
} }
if(!(p->state & (Sdummy|Shide))){ if(!(p->state & (Sdummy|Shide))){
o++; o++;