GN3IF4WF352YK5K4YHVMAIMPL7PNTCEMDWW22PTKDOXKV2FZJ7NQC
QVDQMJXVTM3BBMQDYIAIZMFLBQ56Q27U7H2OYRFE53MEMOCIXIAQC
VJ77YABHVJZWJKLHAGIPC562GYM73AUGRLCP4JLKP5JPWPT2RIHAC
SQLVYKVJ5O4UMKTT56LMFPDQX66SZJJ7FZSFEN5MTWPXXWL7X3WQC
2RXZ3PGOTTZ6M4R372JXIKPLBQKPVBMAXNPIEO2HZDN4EMYW4GNAC
BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC
73OCE2MCBJJZZMN2KYPJTBOUCKBZAOQ2QIAMTGCNOOJ2AJAXFT2AC
XNFTJHC4QSHNSIWNN7K6QZEZ37GTQYKHS4EPNSVPQCUSWREROGIQC
2ZYV7D3W2HPQW2HYB7XDPM4T7KEWPUFPZ77BDLCCDSCLRPJFK6PQC
PHFWIFYKFOGVX7CEAMGJ3FDY6LL5QSZ7T7CTCZ66WMNXV6C242FAC
CG3264MMJTTSCJWUA2EMTBOPTDB2NZIJ7XICKHWUTZ4UWLFP7POAC
KOYAJWE4NJ2J4X3SHEAVMRXYZPZGOMTI7OX3PTUQIDIZ2GQI6UKAC
local byte_offset = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)
table.insert(Lines, Cursor1.line+1, {mode='text', data=string.sub(Lines[Cursor1.line].data, byte_offset)})
local scroll_down = (Cursor_y + math.floor(15*Zoom)) > App.screen.height
Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_offset-1)
Lines[Cursor1.line].fragments = nil
Cursor1.line = Cursor1.line+1
Cursor1.pos = 1
Text.insert_return()
end
end
function Text.insert_return()
local byte_offset = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)
table.insert(Lines, Cursor1.line+1, {mode='text', data=string.sub(Lines[Cursor1.line].data, byte_offset)})
local scroll_down = (Cursor_y + math.floor(15*Zoom)) > App.screen.height
Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_offset-1)
Lines[Cursor1.line].fragments = nil
Cursor1.line = Cursor1.line+1
Cursor1.pos = 1
if scroll_down then
Screen_top1.line = Cursor1.line
Text.scroll_up_while_cursor_on_screen()