The highlit line and cursor are 1 down from the line it thinks it is editing.
I see off-by-one errors are still a common bug class, lol
EDIT: It's only in the earlier examples.
I'm glad you use pulsating cursors. I made this work in WezTerm but it is expensive CPU-wise!