You can either drag the scrollbar or click anywhere in the scrollbar area.
It has this weird funkiness that the scrollbar shrinks as you get near the bottom. But it feels.. weirdly satisfying?
IP4LD33DQFWQ4654YPNJRKQ3CNYSHRZPX6U6ZPY7OLE744XX3MEQC UEG224LHBOPWSKOVXTKVAUEL47HET566LJF7ZSWVKMMLBSJWUHFAC MZ3DMYPD4LSSQKEA3GNI5MK2QNTJ523DTNG6DUPWEWLH4FLUIQSAC 25V2GA6JNWMYNBNFLBHFPJ5ZFYQ4E25E4XMTJSTQJGPPK56RSBAAC FS2ITYYHBLFT66YUC3ENPFYI2HOYHOVEPQIN7NQR6KF5MEK4NKZAC WKKABOJ6WDJ37ELFMS4R3OAJOSPZNZANBVWRMKBCALJKAGSPNUTAC VYAFKS7RAF4Q2D4BUCMXZGILUMQ74KH57MXVRKX4X2J4WILZSQEAC 3G723RV5YPWQQQ52OMKDQAQ2OXV6NGLFXLPNB7YXH5WZIYC7PQXQC D4FEFHQCSILZFQ5VLWNXAIRZNUMCDNGJSM4UJ6T6FDMMIWYRYILQC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC ZM7NOBRMD5HHA35Y4JDC76EOA2RD4KQOQCPURXYKXA6ABMKOJIGQC 5RUFNRJOK3PXQKJTPDEN5K5PI67MGB25QUA44WOCCH2O5KHXT45QC on_editor_scrollbar_area = function(x,y)if x < Editor_state.right+20 then return endif x > Editor_state.right+40 then return endif y < Editor_state.top then return endif y > Editor_state.bottom then return endreturn trueend
on_editor_scrollbar = function(x,y)if x < Editor_state.right+20 then return endif x > Editor_state.right+40 then return endif y < Editor_scrollbar_top then return endif y > Editor_scrollbar_bottom then return endreturn trueend
Editor_scrollbar_top = 0 -- in pxEditor_scrollbar_bottom = 0
adjust_scrollbar = function(y)local s = (y-Editor_state.top) / (Editor_state.bottom-Editor_state.top)local screen_line = s*Editor_state.screen_line_countlocal line = 1for i=1,#Editor_state.lines doif Editor_state.line_cache[i].start_screen_line_index > screen_line thenbreakendline = iendEditor_state.screen_top1 = {line=line, pos=1}Editor_state.cursor1 = {line=line, pos=1}end
edit.mouse_release(Editor_state, x,y, mouse_button)
if Editor_scrollbar_drag thenadjust_scrollbar(y)Editor_scrollbar_drag = nilelseif on_editor_scrollbar_area(x,y) thenadjust_scrollbar(y)elseedit.mouse_release(Editor_state, x,y, mouse_button)end
edit.mouse_press(Editor_state, x,y, mouse_button)
if on_editor_scrollbar(x,y) thenEditor_scrollbar_drag = trueelseif on_editor_scrollbar_area(x,y) then-- nothingelseedit.mouse_press(Editor_state, x,y, mouse_button)end