Unfortunately, code execution in text editors aren't a new thing. Vim had one published in 2019: https://github.com/numirias/security/blob/master/doc/2019-06...
Another in 2004: https://www.cve.org/CVERecord?id=CVE-2002-1377
Neither vim nor Notepad are purely for displaying text though.
> Neither vim nor Notepad are purely for displaying text though.
Up until fairly recently, that's exactly all Notepad did.
Vim has those bugs because of bloat, and now Notepad does too. AI, Markdown, Spellchecker, etc, nobody asked for this bloat.
vim is a far larger program than a text editor.
notepad was always a plain text editor. It had enough problems with unicode and what that means to be "plain text".