@getmem
uploaded an update; moved routines into unit;
there is now a load button.
now the text area will auto scroll, keeping active line centered when needed. I had a brain freeze earlier and winni helped in other post, i dont do much graphic work; so brain was foggy.
the 'glitch', is by design, if you press the wrong key, the displayed correct text is over written with the wrong text, it is then in red, if you type the write character but wrong case ie c instead of C, it is highligted in blue.
The size of the text is limited to 1500px this can be changed, but equates to about a 200 line text file.
I dont use utf8 much at all, all my stuff is old school ascii, will have to look at that, is there routines to manipulate a utf8string with codepoints positions, ie mystr[10] will give the 10th utf8 codepoint; like wize for copy routines.. Like I said, i have not to use it for what I do; which is primarily data aquasition and manipulation from various hardware devices.. so good old HEX,Binary stuff.
edit
modified some ufunction routine in thread execute and wait to reduce cpu load (from 20%idle to 1%idle)