Right, added that in the last version, forgetting that gmatch will always return last empty string after final newline as the last "line".
Fixed in 0.0.29, though will bundle other things there first too.
Thanks for noticing, as I probably wouldn't, with my "paste and run" approach to code-editing with laggy in-game textboxes :)
Come to think of it, some significant part of lagginess is probably those fast gui signal updates and "undo" history action on each change, which saves stuff to globals, which then factorio should check in many ways, serialize, and then maybe even send over network to all other players - all for every single keypress in that textbox!