I started implementing this a while back but it had some bugs and I got busy/distracted. Let me see if I can find my work, although it might have to be redone.
To handle multi-line URLs and potentially named/indexed hyperlinks that show up in emails, OSC-8 terminal code support should be implemented.
Back when we were using the upstream https://github.com/zenhack/go.notmuch, the backend would frequently segfault and crash aerc. Reto ripped out a lot of memory-related code in his fork, which fixed the problem. However, I'm not sure what the deal was - we can't be the only ones using the library and coming across the issue.
This ticket is to keep in mind that we should explore this issue in more detail, and see whether we need to continue using a fork, or we're doing something else wrong and can go back to using upstream (preferable).
I'm going to take this up, already have a draft on my local machine.