It's cool, yes, but it's buggy.
But I have to say that I forgot to add Range checking

, so the origin of all troubles is Range check error.
How to reproduce.
1.Major. Compile with Range check (-Cr). Run, press "Go" button, increase the "Num Lines". Get Range check error(s). Without Range checking it causes different troubles mentioned above.
2.Minor. Compile with Range check and Debugger info, run in Lazarus with debugger, press "Go", close program with mouse not pressing "Stop" button. Though may be this is debugger issue, as this doesn't happen without debugger.
Lazarus 3.2 fpc 3.2.2 Windows 10