[neomutt-devel] Header::collapsed and single message
Richard Russon
rich at flatcap.org
Tue Mar 13 17:14:42 CET 2018
Hi Floyd,
Sorry for the slow reply
> Currently I’m trying to figure out why OP_JUMP doesn’t work as expected
OK, I've had a quick look.
The Context holds an array of Headers
Context:
struct Header **hdrs; // One for each email
int msgcount; // this many
int vcount; // number *visible* in the index
// collapsed aren't counted
int *v2r; // lookup table from *visible* to *real*
Header:
bool collapsed : 1; // part of a collapsed thread?
int virtual; // our virtual message number
menu->current // current virtual message
The user types in NUMBER
// Find the parent of this real message
int msg = mutt_parent_message(Context, Context->hdrs[NUMBER], 1);
// Convert virtual to a real message
msg = Context->v2r[msg];
// Forcibly open that thread
mutt_uncollapse_thread(Context, Context->hdrs[msg]);
// Recalculate the virtual message numbers
mutt_set_virtual(Context);
I've put a proof-of-concent in branch [devel/jump].
There's no error checking and it might the wrong solution in the wrong
place. But, it works.
Cheers,
Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 868 bytes
Desc: not available
URL: <http://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20180313/070b858e/attachment.sig>
More information about the neomutt-devel
mailing list