Still some limitations. The text cursor has to be visible on screen, so if you have a long series of drawings without intervening lines of text you won't be able to scroll through them all.
DLQMM2656JHXX3ONOEM6UIOXKFJFT5QT7RHWK7YS2W77PVZWHRSAC HYEAFRZ2UEKDYTAE2GDQLHEJBPQASP2NDLMXB7F6MTVK2BKOXKEAC 252M2QMDBMNWHBZY5MDSC7WVYO5JBLJYPVMW5W4IVJCZVYRQ5IQQC XNFTJHC4QSHNSIWNN7K6QZEZ37GTQYKHS4EPNSVPQCUSWREROGIQC BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC MGOQ5XAVFTWZPBG2O5ZTGSEKU6BRJKQZLDV6CM4737VD2FAEB5JQC AVQ5MC5DWNLI6LUUIPGBLGP4LKRPGWBY4THNY25OBT2FAVHC6MCAC OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC XX7G2FFJ4QCGQGD4REAW5QFHVYAKCFUPGZCK7L6DFGS5ISVBYBQQC 7IKRRESBHMYHHKW4XHUEEKHKPOBLAGZ7A7FJMRU32MTRKIV6S7GQC V5TP27FPD6GPATHPABRW2FKP7BIKY53KL47UVEU5DF4WXEZF7CKAC HDCVGN6GQPG3GD43E7YOVGVI6MVQTETKMJVXKC5EOC7YXJYTQOLQC VVXVV2D2F5Y6D6N5VVPUPK3N6GMDTG2YCYPQDYTYEKVKBYHRRYEAC XJ5J7LDI4AI5J3S67AN5GV6VUIAUCADL2YPGV753ENTW5QUYH5BAC BJ5X5O4ACBBJ56LRBBSTCW6IBQP4HAEOOOPNH3SKTA4F66YTOIDAC 6F6DF5T3XUD2AEAJT4GBEBZXOVPTGLK5HY36VIW6P6AKAHJQE5UQC IFGAJAF7UWM236QV4NWP2C67TJPQGXNBC2RTZCOWPJUJYYC2MMXAC JVRL5TWLBTWMTHJDZSDN5XQDMEIIPVAZBKUP75HMO7JHURAYWG5QC 3SYFA5JQXQSPEFWAZEZ6LI7VUVHWXQHMOMMSUNAKL6S4TQFLZOLQC VHQCNMARPMNBSIUFLJG7HVK4QGDNPCGNVFLHS3I4IGNVSV5MRLYQC BLWAYPKV3MLDZ4ALXLUJ25AIR6PCIL4RFYNRYLB26GFVC2KQBYBAC ZD63LJ2TGWQQ5KWAX22QUWEYI2X5XUI2UTE4E7LGY26AS7HT2WGQC JCSLDGAH2F6AIY4Z6XM6K4LOMW7EFY3E4NF5YXLMHLTYTX3A4Z3QC y = y+15*Zoomline.y = yif line.mode == 'text' and line.data == '' thenbutton('draw', {x=4,y=y+4, w=12,h=12, color={1,1,0},icon = icon.insert_drawing,onpress1 = function()table.insert(Lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})if Cursor_line >= line_index thenCursor_line = Cursor_line+1endend})if line_index == Cursor_line thenlove.graphics.setColor(0,0,0)love.graphics.print('_', 25, y+6) -- drop the cursor down a bit to account for the increased font sizeendelseif line.mode == 'drawing' theny = y+Drawing.pixels(line.h)Drawing.draw(line, y)elseText.draw(line, line_index, Cursor_line, y, Cursor_pos)
if line_index >= Screen_top_line theny = y+15*Zoomif y > Screen_height then break endScreen_bottom_line = line_indexline.y = yif line.mode == 'text' and line.data == '' thenbutton('draw', {x=4,y=y+4, w=12,h=12, color={1,1,0},icon = icon.insert_drawing,onpress1 = function()table.insert(Lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})if Cursor_line >= line_index thenCursor_line = Cursor_line+1endend})if line_index == Cursor_line thenlove.graphics.setColor(0,0,0)love.graphics.print('_', 25, y+6) -- drop the cursor down a bit to account for the increased font sizeendelseif line.mode == 'drawing' theny = y+Drawing.pixels(line.h)Drawing.draw(line, y)elseText.draw(line, line_index, Cursor_line, y, Cursor_pos)end
endelseif chord == 'pagedown' thenScreen_top_line = Screen_bottom_lineCursor_line = Screen_top_lineCursor_pos = 1elseif chord == 'pageup' then-- duplicate some logic from love.drawlocal y = Screen_heightwhile y >= 0 doif Screen_top_line == 1 then break endif Lines[Screen_top_line].mode == 'text' theny = y - 15*Zoomelsey = y - Drawing.pixels(Lines[Screen_top_line].h)endScreen_top_line = Screen_top_line - 1endif Cursor_line ~= Screen_top_line thenCursor_pos = 1