tab.content.Invalidate() every time you type a character in the subject header. That causes the whole tab to be redrawn rather than just the tab strip. On a very slow machine, this takes a long time and there is a noticeable lag - ~750ms per character on a RaspberryPi 1 - giving a poor experience. Commenting out the
Invalidate() line doesn't seem to break anything (tab strip and subject line update OK), although I've not tested it thoroughly. Is that line needed?
Incidentally, the reason it take so long to refresh the screen seems to be that it invalidates the whole of the editor area. This necessitates many calls to
/widgets/terminal.go which takes majority of the time. But that's probably a performance bug for go-libvterm.
I just ran into this as well, I think. Especially bad if you paste in a line of text all at once. Pasting into the body of the email seems slow as well, but not comically slow the way it is with the subject line. I'm using aerc over ssh in tmux which may or may not affect term drawing and such, although the plain typing seems plenty fast.