@prologic@twtxt.net Yes, it’s all written from scratch, but most of it is written in C (not Assembler) and having a C standard library available helps a lot. It’s not that different from writing a program for DOS, just the syscalls are different. 😅
@lyse@lyse.isobeef.org Scrolling the viewport was the most annoying part. 🥴 The code also assumes that it is running on a “fast” PC. There are no “elaborate” data structures like a gap buffer. (But it does use dynamic arrays, which Wikipedia lists as a special case of a gap buffer. 🤔)
To display text on the screen, the editor writes directly to video memory (https://wiki.osdev.org/Printing_To_Screen). This is a blessing and much easier than fiddling with escape sequences. I wish you could do something like that on a Linux terminal.