resolve conflicts
Dependencies
- [2]
CGASWIHLirrelevant issue fork this fork - [3]
ESH2GCJ6pijul bug - [4]
NBTKJTI5resolve conflicts - [5]
GVJEOWYQresolve conflicts - [6]
TMWSQNZDbugfix in source editor: don't clear selection on M-arrow - [7]
N33WSVVOwhitespace - [8]
NSM73TX3crap, fix some final changes in the source editor - [9]
LYN3L74Wcorrect commit f3abc2cbf2 - [10]
GNQC72UXgeneralize a function - [11]
WK6UK5AJenhance bugfix of commit a9aa3436f (Dec 2024) - [12]
XX7G2FFJintermingle freehand line drawings with text - [13]
LNUHQOGHstart passing in Editor_state explicitly - [14]
KKMFQDR4editing source code from within the app - [15]
JYZKEDDGMerge lines.love - [16]
MXSAHZN4Merge lines.love - [17]
LWPFEZBIMerge lines.love - [18]
XS3PZI7GMerge lines.love - [19]
SVJZZDC3snapshot - no, that's all wrong - [20]
WTDKUACNrectangle and square shapes - [21]
MP2TBKU6bugfix: crash in Text.up() after return - [22]
Z5HLXU4Padd state arg to a few functions - [23]
WKXJNESIresolve conflicts - [24]
6DE7RBZ6move mouse_released events to Drawing - [25]
DSLD74DKlots more tests - [26]
4KC7I3E2make colors easier to edit - [27]
DLQAEAC7add state arg to Drawing.mouse_pressed - [28]
MUJTM6REbring back a level of wrapping - [29]
4SR3Z4Y3document the version of LÖVE I've been using - [30]
62JEPVQ3bugfix: backspace from start of final line - [31]
VBU5YHLRMerge lines.love - [32]
6XCJX4DZbugfix: inscript's bug - [33]
5SM6DRHKport inscript's bugfix to source editor - [34]
TGHAJBESuse line cache for drawings as well - [35]
PJEQCTBLadd state arg to Drawing.update - [36]
OWK3U6VDtests for drawing polygons - [37]
4J3Y3DJWpijul bug: redo upstream change - [38]
5DOTWNVMright margin - [39]
656FM555bugfix: clear selection when clicking above or below lines - [40]
G3DLS5OUaudit all asserts - [41]
4YDBYBA4clean up memory leak experiments - [42]
3PSFWAILMerge lines.love - [43]
3TI67SEJmore bugfix - [44]
2EKE4XLLsimplify - [45]
ZPUQSPQPextract a few methods - [46]
JFFUF5ALoverride mouse state lookups in tests - [47]
VOU73AK6Merge lines.love - [48]
UHB4GARJleft/right margin -> left/right coordinates - [49]
MXA3RZYKdeduce left/right from state where possible - [50]
XNFTJHC4split keyboard handling between Text and Drawing - [51]
GFXWHTE6mouse wheel support - [52]
SGMA5JLEsave the list of tests in repo - [53]
KOYAJWE4extract a couple more methods - [54]
TFUNIT6Mresolve conflicts - [55]
ZS5IYZH5stop caching screen_bottom1 - [56]
VHUNJHXBMerge lines.love - [57]
Z3BQO2RKtypo - [58]
BXJMGTV2hoist couple of variables out - [59]
A4BSGS2CMerge lines.love - [60]
LAW2O3NWextract variable Margin_left - [61]
DLQMM265scroll past first page - [62]
AVFRVNFRbetter handle moving points - [63]
QXVD2RIFadd state arg to Drawing.mouse_released - [64]
CNCYMM6Amake test initializations a little more obvious - [65]
2CTN2IEFMerge lines.love - [66]
VP5KC4XZMerge lines.love - [67]
73OCE2MCafter much struggle, a brute-force undo - [68]
7CLGG7J2test: autosave after any shape - [69]
NHA7RUFImove current mode indicator slightly - [70]
RAXUQQ6ZMerge lines.love - [71]
OI4FPFINsupport drawings in the source editor - [72]
34BZ5ZKNMerge lines.love - [73]
AYG2PQCGfix a couple of asserts missed in the recent audit - [74]
QCPXQ2E3add state arg to a few functions - [75]
D2GCFTTTclean up repl functionality - [76]
2JBAEQHUMerge lines.love - [77]
25V2GA6Jtaking stock - [78]
GGJEDJOOadd args to some functions - [79]
SRVDX4I5local var - [80]
K2X6G75Zstart writing some tests for drawings - [81]
CUIV2LE5some typos - [82]
W2CQ7YNGmore chunks, same approach - [83]
2TQR4PSYadd args to some functions - [84]
EAEGCJV5rename - [85]
65HNIAOSmake freehand drawings smoother - [86]
3HVBAZPAadd state arg to a few functions - [87]
NHNP76LGswap return values - [88]
KMSL74GAsupport selections in the source editor - [89]
FNJF2FMQbugfix: online help - [90]
CE4LZV4Tdrop last couple of manual tests - [91]
JOPVPUSAediting source code from within the app - [92]
BH7BT36Lctrl+a: select entire buffer - [93]
BTKAW76Lrename - [94]
Z3IQ6A4Rbugfix - [95]
ONHKBLLCMerge lines.love - [96]
WJBZZQE4fold together two largely similar cases - [97]
TOXPJJYYresolve conflicts - [98]
JYB3RFWHbugfix in source editor - [99]
ZZ2B5RPQextract variables for drawing padding - [100]
AH744RFRshow when we're naming a point - [101]
DRFE3B3Zmouse buttons are integers, not strings - [102]
VHQCNMARseveral more modules - [103]
B4FAIVRAMerge lines.love - [104]
QFC3WRDZchunking by simple local variable - [105]
QAMVLUK2fix a crash involving mouse and drawings - [106]
LIKTH6HMupdate stale source X-( - [107]
2344TV56Merge lines.love - [108]
LUNH47XXmake text and drawings the same width - [109]
BYG5CEMVsupport for naming points - [110]
TGZAJUEFbring back a set of constants - [111]
JJ7J4PUBsome unnecessary mutations - [112]
KTZQ57HVreplace globals with args in a few functions - [113]
23MA4T3Gadd state arg to Drawing.keychord_pressed - [114]
L6XA5EY2test: moving a point - [115]
ED4Z6ORCcleaner API for file-system access - [116]
CSXIZ4FAresolve conflicts - [117]
TLOAPLBJadd a license - [118]
3QNOKBFMbeginnings of a test harness - [119]
5BMR5HRTclick to the left of a line - [120]
ORKN6EOBMerge lines.love - [121]
7YGYHOEOMerge lines.love - [122]
AVTNUQYRbasic test-enabled framework - [123]
2TQUKHBCMerge lines.love - [124]
YXQOITYSMerge lines.love - [125]
ZLJYLPOTMerge lines.love - [126]
P5QNVXSNdrop final mention of state global beyond main.lua - [127]
VTCPDL3Aresolve conflicts - [128]
TXI6GSQDsome minor cleanup - [129]
BULPIBEGbeginnings of a module for the text editor - [130]
66X36NZNa little more prose describing manual_tests - [131]
GZ5WULJVswitch source side to new screen-line-based render - [132]
KYNGDE2Cconsistent names in a few more places - [133]
MD3W5IRAnew fork: rip out drawing support - [134]
5UKUADTWdistinguish consistently between mouse buttons and other buttons - [135]
LF7BWEG4group all editor globals - [136]
G54H3YG2get rid of all bifold text - [137]
KV7GGVERcouple of accidental globals - [138]
3OTESDW6move drawing.starty into line cache - [139]
LXTTOB33extract a couple of files - [140]
P4376EXKadd state arg to few functions - [141]
3XNFQDDNMerge lines.love - [142]
BLWAYPKVextract a module - [143]
OTIBCAUJlove2d scaffold - [144]
WLJCIXYMadd state arg to a few functions - [145]
R3XGABERchunk up some long lines - [146]
OJBGNAN6slight reorg in Readme - [147]
6LJZN727handle chords - [148]
HYEAFRZ2split mouse_pressed events between Text and Drawing - [149]
R5QXEHUIsomebody stop me - [150]
HOSPP2ANcrisp font rendering - [151]
KZ5GAYRPthis fixes the immediate regression - [152]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [153]
C6QTJYA4keep online help inside of drawing - [154]
QCQTMUZ7add args to some functions - [155]
ZTMRQZSWReadme - [156]
EHSUSZMKmore idiomatic variable names - [157]
HTWAM4NZbugfix: scrolling in left/right movements - [158]
KOTNETIMrepeat changes on source editor - [159]
UTDSCN3GMerge lines.love - [160]
NYQ7HD4Dmove - [161]
Q7XPSKIIMerge lines.love - [162]
T4FRZSYLdelete an ancient, unused file - [163]
FS2ITYYHrecord a known issue - [164]
REAIVN7WMerge lines.love - [165]
PXSQR2ADhide line numbers from log browser - [166]
QMRQL2FOresolve conflicts - [167]
FHNPQBLKmore carefully pass the 'key' arg around - [168]
KWIVKQQ7Merge lines.love - [169]
2CH77LZCadd args to some functions - [170]
M6TH7VSZrip out notion of Line_width - [171]
RT6EV6OPdelegate update events to drawings - [172]
OGUV4HSAremove some memory leaks from rendered fragments - [173]
FZCKGO2Imake local functions look different - [174]
32V6ZHQBMerge lines.love - [175]
4PHGNJN6assume starty can be nil in update - [176]
6VJTQKW7start supporting LÖVE v12 - [177]
B4JEWKWIhide editor cursor while in file navigator - [178]
2CK5QI7Wmake love event names consistent - [179]
TBTRYEBPMerge lines.love - [180]
D4B52CQ2Merge lines.love - [181]
2TCIWW6Zstop caching starty - [182]
2L5MEZV3experiment: new edit namespace - [183]
IDGP4BJZnew known issue with drawings - [184]
APX2PY6Gstop tracking wallclock time - [185]
VXORMHMEdelete experimental REPL - [186]
ORRSP7FVdeduce test names on failures - [187]
KKQKPGCIresolve conflicts - [188]
TVCPXAAUrename - [189]
3RGHOJ25DRY some code - [190]
7JH2ZT3Fadd state arg to Drawing.draw - [191]
2MGBV7NPbugfix: crash when using mouse wheel - [192]
R2ASHK5Cfix a bad merge - [193]
MBAJPTDJresolve conflicts - [194]
YJGADSGKdelete unused arg - [195]
SCOXD4EOMerge lines.love - [196]
BW2IUB3Kkeep all text cache writes inside text.lua - [197]
RSZD5A7Gforgot to add json.lua - [198]
ILOA5BYFseparate data structure for each line's cache data - [199]
CPZGQT72go through and fix similar issues - [200]
N2NUGNN4include a brief reference enabling many useful apps - [201]
JAXPXLEBset current_drawing_index with current_drawing - [202]
GIG6OV3Gport keyboard layout handling to source editor - [203]
YCDYGEZUinclude drawing index in a few places - [204]
AQMZJXURuse editor state font for width calculations - [205]
C45WCXJ2keep drawings within the line width slider as well
Change contents
- file deletion: source_text_tests.lua source_text_tests.lua
App.screen.init{width=800, height=600}edit.run_after_keychord(Editor_state, 'M-right', 'right')edit.run_after_keychord(Editor_state, 'M-right', 'right')edit.draw(Editor_state) -- populate line_cache.startpos for each lineedit.run_after_keychord(Editor_state, 'S-right', 'right')edit.run_after_keychord(Editor_state, 'right', 'right')edit.draw(Editor_state) -- populate line_cache.startpos for each lineedit.draw(Editor_state) -- populate line_cache.startpos for each lineedit.draw(Editor_state) -- populate line_cache.startpos for each lineedit.draw(Editor_state) -- populate line_cache.startpos for each lineedit.run_after_keychord(Editor_state, 'right', 'right')check_eq(Editor_state.screen_top1.line, 2, 'screen_top')check_eq(Editor_state.cursor1.line, 3, 'cursor:line')check_eq(Editor_state.cursor1.pos, 6, 'cursor:pos')-- click on first locationedit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)-- hold down shift and click on a second locationApp.fake_key_press('lshift')edit.run_after_mouse_press(Editor_state, Editor_state.left+20,Editor_state.top+5, 1)edit.run_after_mouse_release(Editor_state, Editor_state.left+20,Editor_state.top+Editor_state.line_height+5, 1)-- hold down shift and click at a third locationApp.fake_key_press('lshift')edit.run_after_mouse_press(Editor_state, Editor_state.left+20,Editor_state.top+5, 1)edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+Editor_state.line_height+5, 1)App.fake_key_release('lshift')-- selection is between first and third location. forget the second location, not the first.-- click on first locationedit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)-- hold down shift and click somewhere elseApp.fake_key_press('lshift')edit.run_after_mouse_press(Editor_state, Editor_state.left+20,Editor_state.top+5, 1)edit.run_after_mouse_release(Editor_state, Editor_state.left+20,Editor_state.top+Editor_state.line_height+5, 1)App.fake_key_release('lshift')-- press mouse above first line of textedit.run_after_mouse_press(Editor_state, Editor_state.left+8,5, 1)check(Editor_state.selection1.line ~= nil, 'selection:line-not-nil')check_eq(Editor_state.selection1.line, 1, 'selection:line')check_eq(Editor_state.selection1.pos, 1, 'selection:pos')-- press and hold on first locationedit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)-- drag and release somewhere elseedit.run_after_mouse_release(Editor_state, Editor_state.left+20,Editor_state.top+Editor_state.line_height+5, 1)-- no change to data, selection is resetApp.fake_key_release('lshift')edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)check_eq(Editor_state.cursor1.line, 2, 'line')check_eq(Editor_state.cursor1.pos, 4, 'pos')check_eq(Editor_state.cursor1.pos, 9, 'check')Editor_state = edit.initialize_test_state()Editor_state.lines = load_array{}Text.redraw_all(Editor_state)edit.draw(Editor_state)edit.run_after_mouse_click(Editor_state, 8,Editor_state.top+8, 1)-- cursor skips drawing to always remain on text - file deletion: source_text.lua source_text.lua
-- return y for the next linereturn y--? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)--? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)--? print('=>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)State.screen_top1 = Text.previous_screen_top1(State)State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary(State)Text.redraw_all(State) -- if we're scrolling, reclaim all fragments to avoid memory leaksendfunction Text.previous_screen_top1(State)-- does not modify State (except to populate line_cache)local loc2 = Text.to2(State, State.screen_top1)if loc2.line == 1 and loc2.screen_line == 1 and loc2.screen_pos == 1 then break endif State.lines[loc2.line].mode == 'text' thenelseif State.lines[loc2.line].mode == 'drawing' theny = y - Drawing_padding_height - Drawing.pixels(State.lines[loc2.line].h, State.width)loc2 = Text.previous_screen_line(State, loc2)return Text.to1(State, loc2)State.screen_top1 = Text.screen_bottom1(State)end-- return the location of the start of the bottom-most line on screenfunction Text.screen_bottom1(State)-- duplicate some logic from love.draw-- does not modify State (except to populate line_cache)local loc2 = Text.to2(State, State.screen_top1)local y = State.topwhile true doif State.lines[loc2.line].mode == 'text' theny = y + State.line_heightelseif State.lines[loc2.line].mode == 'drawing' theny = y + Drawing_padding_height + Drawing.pixels(State.lines[loc2.line].h, State.width)endif y + State.line_height > App.screen.height then break endlocal next_loc2 = Text.next_screen_line(State, loc2)if Text.eq2(next_loc2, loc2) then break endloc2 = next_loc2endreturn Text.to1(State, loc2)--? print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)local screen_bottom1 = Text.screen_bottom1(State)--? print('down 2', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, screen_bottom1.line, screen_bottom1.pos)if State.cursor1.line > screen_bottom1.line thenlocal screen_bottom1 = Text.screen_bottom1(State)local scroll_down = Text.le1(screen_bottom1, State.cursor1)--? print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)assert(State.lines[loc1.line].mode == 'text')function Text.final_text_loc_on_screen(State)local screen_bottom1 = Text.screen_bottom1(State)if State.lines[screen_bottom1.line].mode == 'text' thenreturn {line=screen_bottom1.line,pos=Text.pos_at_end_of_screen_line(State, screen_bottom1),}endlocal loc2 = Text.to2(State, screen_bottom1)while true doif State.lines[loc2.line].mode == 'text' then break endassert(loc2.line > 1 or loc2.screen_line > 1 and loc2.screen_pos > 1) -- elsewhere we're making sure there's always at least one text line on screenloc2 = Text.previous_screen_line(State, loc2)endlocal result = Text.to1(State, loc2)result.pos = Text.pos_at_end_of_screen_line(State, result)return resultend--? print('snap', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)--? print('snap =>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)local starty = Text.starty(State, line_index)if starty == nil then return false end -- outside current pageif y < starty then return false endreturn y < starty + State.line_height*(#line_cache.screen_line_starting_pos - Text.screen_line_index(line_cache.screen_line_starting_pos, line_cache.startpos) + 1)local starty = Text.starty(State, line_index)assert(my >= starty, 'failed to map y pixel to line')local y = startyfunction Text.eq2(a, b)return a.line == b.line and a.screen_line == b.screen_line and a.screen_pos == b.screen_posendendendfunction Text.next_screen_line(State, loc2)if State.lines[loc2.line].mode == 'drawing' thenreturn {line=loc2.line+1, screen_line=1, screen_pos=1}endText.populate_screen_line_starting_pos(State, loc2.line)if loc2.screen_line >= #State.line_cache[loc2.line].screen_line_starting_pos thenif loc2.line < #State.lines thenreturn {line=loc2.line+1, screen_line=1, screen_pos=1}elsereturn loc2endelsereturn {line=loc2.line, screen_line=loc2.screen_line+1, screen_pos=1}local screen_bottom1 = Text.screen_bottom1(State)elseif State.cursor1.line >= screen_bottom1.line thenState.cursor1 = Text.final_text_loc_on_screen(State)endendend-- slightly expensive since it redraws the screenfunction Text.cursor_out_of_screen(State)if Text.lt1(State.cursor1, State.screen_top1) thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}endendfunction Text.offset(s, pos1)if pos1 == 1 then return 1 endlocal result = utf8.offset(s, pos1)if result == nil thenlocal start_screen_line_index = Text.screen_line_index(line_cache.screen_line_starting_pos, line_cache.startpos)for screen_line_index = start_screen_line_index,#line_cache.screen_line_starting_pos dolocal screen_line_starting_pos = line_cache.screen_line_starting_pos[screen_line_index]local screen_line_starting_byte_offset = Text.offset(line.data, screen_line_starting_pos)--? print('iter', y, screen_line_index, screen_line_starting_pos, string.sub(line.data, screen_line_starting_byte_offset))-- duplicate some logic from Text.drawend-- convert mx,my in pixels to schema-1 coordinatesText.populate_screen_line_starting_pos(State, line_index)Text.redraw_all(State) -- if we're scrolling, reclaim all fragments to avoid memory leaks--? print('cursor pos '..tostring(State.cursor1.pos)..' is on the #'..tostring(top2.screen_line)..' screen line down')local y = App.screen.height - State.line_height-- duplicate some logic from love.drawwhile true dofunction Text.cursor_at_final_screen_line(State)Text.populate_screen_line_starting_pos(State, State.cursor1.line)Text.populate_screen_line_starting_pos(State, loc1.line)local line_cache = State.line_cache[loc1.line]local most_recent_final_pos = utf8.len(State.lines[loc1.line].data)+1for i=#line_cache.screen_line_starting_pos,1,-1 dolocal spos = line_cache.screen_line_starting_pos[i]if spos <= loc1.pos thenreturn most_recent_final_posendmost_recent_final_pos = spos-1endendfunction Text.start_of_line(State)--? print('cursor is NOT at final screen line of its line')local screen_line_starting_pos, screen_line_index = Text.pos_at_start_of_screen_line(State, State.cursor1)Text.populate_screen_line_starting_pos(State, State.cursor1.line)local new_screen_line_starting_pos = State.line_cache[State.cursor1.line].screen_line_starting_pos[screen_line_index+1]--? print('switching pos of screen line at cursor from '..tostring(screen_line_starting_pos)..' to '..tostring(new_screen_line_starting_pos))local new_screen_line_starting_byte_offset = Text.offset(State.lines[State.cursor1.line].data, new_screen_line_starting_pos)local s = string.sub(State.lines[State.cursor1.line].data, new_screen_line_starting_byte_offset)--? print('screen top before:', State.screen_top1.line, State.screen_top1.pos)--? print('scroll up preserving cursor')Text.snap_cursor_to_bottom_of_screen(State)--? print('screen top after:', State.screen_top1.line, State.screen_top1.pos)endassert(State.cursor1.pos, 'cursor has no pos')endfunction Text.up(State)State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}endfunction Text.pagedown(State)endendy = y - State.line_heightlocal y = App.screen.height - State.line_heightwhile y >= State.top do-- duplicate some logic from love.draw-- return the top y coordinate of a given line_index,-- or nil if no part of it is on screenfunction Text.starty(State, line_index)-- duplicate some logic from love.draw-- does not modify State (except to populate line_cache)if line_index < State.screen_top1.line then return endlocal loc2 = Text.to2(State, State.screen_top1)local y = State.topwhile true doif loc2.line == line_index then return y endif State.lines[loc2.line].mode == 'text' theny = y + State.line_heightelseif State.lines[loc2.line].mode == 'drawing' theny = y + Drawing.pixels(State.lines[loc2.line].h, State.width) + Drawing_padding_bottomendif y + State.line_height > App.screen.height then break endlocal next_loc2 = Text.next_screen_line(State, loc2)if Text.eq2(next_loc2, loc2) then break end -- end of fileloc2 = next_loc2endendif State.lines[loc2.line].mode == 'drawing' theny = y + Drawing_padding_topendendschedule_save(State)record_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)})elseif chord == 'backspace' thenText.insert_at_cursor(State, '\t')if State.cursor_y > App.screen.height - State.line_height thenText.populate_screen_line_starting_pos(State, State.cursor1.line)Text.snap_cursor_to_bottom_of_screen(State, State.left, State.right)Text.insert_at_cursor(State, t)if State.cursor_y > App.screen.height - State.line_height thenText.populate_screen_line_starting_pos(State, State.cursor1.line)Text.snap_cursor_to_bottom_of_screen(State, State.left, State.right)endrecord_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)})endfunction Text.insert_at_cursor(State, t)endfunction Text.screen_line(line, line_cache, i)local pos = line_cache.screen_line_starting_pos[i]local offset = Text.offset(line.data, pos)if i >= #line_cache.screen_line_starting_pos thenreturn line.data:sub(offset)function Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers) - file deletion: source_edit.lua source_edit.lua
---- On lines that are drawings, pos will be nil.cursor1 = {line=1, pos=1}, -- position of cursor; must be on a text liney = Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers)if Drawing.in_drawing(State, line_index, x, y, State.left,State.right) thenState.selection1 = Text.final_text_loc_on_screen(State)State.cursor1 = Text.final_text_loc_on_screen(State)State.cursor1 = Text.screen_bottom1(State)chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(key) thenedit.draw(State)App.fake_mouse_release(x,y, mouse_button)Text.delete_selection(State, State.left, State.right)endedit.put_cursor_on_next_text_line(State)edit.clean_up_mouse_press(State)endState.lines.current_drawing_index = line_indexState.lines.current_drawing = lineDrawing.before = snapshot(State, line_index)--? print('=> y', y)elseif line.mode == 'drawing' theny = y+Drawing_padding_topDrawing.draw(State, line_index, y)y = y + Drawing.pixels(line.h, State.width) + Drawing_padding_bottomelsescreen_top1 = {line=1, pos=1}, -- position of start of screen line at top of screen - edit in text_tests.lua at line 16
App.screen.init{width=800, height=600} - edit in text.lua at line 359
if State.lines[loc2.line].mode == 'drawing' theny = y + Drawing_padding_topend - replacement in text.lua at line 360
if State.lines[loc2.line].mode == 'text' theny = y + State.line_heightelseif State.lines[loc2.line].mode == 'drawing' theny = y + Drawing.pixels(State.lines[loc2.line].h, State.width) + Drawing_padding_bottomendy = y + State.line_height - edit in text.lua at line 374
y = y - State.line_height - resurrect zombie in text.lua at line 374[9.16711]→[9.817:905](∅→∅),[9.16711]→[9.817:905](∅→∅),[9.563]→[9.1107:1157](∅→∅),[9.563]→[9.1107:1157](∅→∅)
if loc2.line == 1 and loc2.screen_line == 1 and loc2.screen_pos == 1 then break endloc2 = Text.previous_screen_line(State, loc2) - replacement in text.lua at line 375[9.905]→[9.905:955](∅→∅),[9.905]→[9.905:955](∅→∅),[9.2923]→[9.956:1106](∅→∅),[9.2923]→[9.956:1106](∅→∅)
if State.lines[loc2.line].mode == 'text' thenelseif State.lines[loc2.line].mode == 'drawing' theny = y - Drawing_padding_height - Drawing.pixels(State.lines[loc2.line].h, State.width)y = y - State.line_height - replacement in text.lua at line 395
if State.lines[loc2.line].mode == 'text' theny = y + State.line_heightelseif State.lines[loc2.line].mode == 'drawing' theny = y + Drawing_padding_height + Drawing.pixels(State.lines[loc2.line].h, State.width)endy = y + State.line_height - replacement in text.lua at line 443
--? print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos) - replacement in text.lua at line 447
--? print('cursor at final screen line of its line')print('cursor at final screen line of its line') - replacement in text.lua at line 452
--? print(State.cursor1.pos)print(State.cursor1.pos) - replacement in text.lua at line 455
--? print('down 2', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, screen_bottom1.line, screen_bottom1.pos)print('down 2', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, screen_bottom1.line, screen_bottom1.pos) - replacement in text.lua at line 457[9.2370]→[9.6537:6622](∅→∅),[9.6537]→[9.6537:6622](∅→∅),[9.6622]→[9.3515:3562](∅→∅),[9.70860]→[9.3515:3562](∅→∅),[9.3515]→[9.3515:3562](∅→∅)
--? print('screen top before:', State.screen_top1.line, State.screen_top1.pos)--? print('scroll up preserving cursor')print('screen top before:', State.screen_top1.line, State.screen_top1.pos)print('scroll up preserving cursor') - replacement in text.lua at line 460
--? print('screen top after:', State.screen_top1.line, State.screen_top1.pos)print('screen top after:', State.screen_top1.line, State.screen_top1.pos) - replacement in text.lua at line 466
--? print('cursor is NOT at final screen line of its line')print('cursor is NOT at final screen line of its line') - replacement in text.lua at line 470[9.252]→[9.4192:4338](∅→∅),[9.688]→[9.4192:4338](∅→∅),[9.4875]→[9.4192:4338](∅→∅),[9.6880]→[9.4192:4338](∅→∅),[9.71160]→[9.4192:4338](∅→∅),[9.4192]→[9.4192:4338](∅→∅)
--? print('switching pos of screen line at cursor from '..tostring(screen_line_starting_pos)..' to '..tostring(new_screen_line_starting_pos))print('switching pos of screen line at cursor from '..tostring(screen_line_starting_pos)..' to '..tostring(new_screen_line_starting_pos)) - replacement in text.lua at line 474
--? print('cursor pos is now', State.cursor1.line, State.cursor1.pos)print('cursor pos is now', State.cursor1.line, State.cursor1.pos) - replacement in text.lua at line 476
--? print('scroll up preserving cursor')print('scroll up preserving cursor') - replacement in text.lua at line 478
--? print('screen top after:', State.screen_top1.line, State.screen_top1.pos)print('screen top after:', State.screen_top1.line, State.screen_top1.pos) - replacement in text.lua at line 481
--? print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos) - edit in text.lua at line 601
assert(State.lines[loc1.line].mode == 'text') - replacement in text.lua at line 616[9.2647]→[9.2647:2705](∅→∅),[9.2705]→[9.201:214](∅→∅),[9.201]→[9.201:214](∅→∅),[9.214]→[9.2706:2803](∅→∅),[9.2803]→[9.323:335](∅→∅),[9.323]→[9.323:335](∅→∅),[9.335]→[9.2804:2851](∅→∅),[9.2851]→[9.388:790](∅→∅),[9.388]→[9.388:790](∅→∅)
if State.lines[screen_bottom1.line].mode == 'text' thenreturn {line=screen_bottom1.line,pos=Text.pos_at_end_of_screen_line(State, screen_bottom1),}endlocal loc2 = Text.to2(State, screen_bottom1)while true doif State.lines[loc2.line].mode == 'text' then break endassert(loc2.line > 1 or loc2.screen_line > 1 and loc2.screen_pos > 1) -- elsewhere we're making sure there's always at least one text line on screenloc2 = Text.previous_screen_line(State, loc2)endlocal result = Text.to1(State, loc2)result.pos = Text.pos_at_end_of_screen_line(State, result)return resultreturn {line=screen_bottom1.line,pos=Text.pos_at_end_of_screen_line(State, screen_bottom1),} - edit in text.lua at line 890
if State.lines[loc2.line].mode == 'drawing' thenreturn {line=loc2.line+1, screen_line=1, screen_pos=1}end - replacement in source_text_tests.lua at line 19
App.screen.init{width=120, height=60}App.screen.init{width=800, height=600} - edit in source_text_tests.lua at line 78
Editor_state.screen_bottom1 = {} - replacement in source_text_tests.lua at line 234
edit.run_after_keychord(Editor_state, 'M-right', 'right')edit.run_after_keychord(Editor_state, 'M-right', 'right') - replacement in source_text_tests.lua at line 245
edit.run_after_keychord(Editor_state, 'M-right', 'right')edit.run_after_keychord(Editor_state, 'M-right', 'right') - edit in source_text_tests.lua at line 257
Editor_state.screen_bottom1 = {} - replacement in source_text_tests.lua at line 258
edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cacheedit.draw(Editor_state) -- populate line_cache.startpos for each line - edit in source_text_tests.lua at line 275
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 294
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 312
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 330
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 347
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 363
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 379
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 396
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 414
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 431
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 448
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 466
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 488
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 508
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 531
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 555
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 573
Editor_state.screen_bottom1 = {} - replacement in source_text_tests.lua at line 576
edit.run_after_keychord(Editor_state, 'S-right', 'right')edit.run_after_keychord(Editor_state, 'S-right', 'right') - edit in source_text_tests.lua at line 595
Editor_state.screen_bottom1 = {} - replacement in source_text_tests.lua at line 597
edit.run_after_keychord(Editor_state, 'right', 'right')edit.run_after_keychord(Editor_state, 'right', 'right') - edit in source_text_tests.lua at line 612
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 628
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 649
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 666
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 683
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 701
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 724
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 742
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 770
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 786
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 814
Editor_state.screen_bottom1 = {} - replacement in source_text_tests.lua at line 815
edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cacheedit.draw(Editor_state) -- populate line_cache.startpos for each line - edit in source_text_tests.lua at line 833
Editor_state.screen_bottom1 = {} - replacement in source_text_tests.lua at line 834
edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cacheedit.draw(Editor_state) -- populate line_cache.startpos for each line - edit in source_text_tests.lua at line 850
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 872
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 892
Editor_state.screen_bottom1 = {} - replacement in source_text_tests.lua at line 893
edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cacheedit.draw(Editor_state) -- populate line_cache.startpos for each line - edit in source_text_tests.lua at line 916
Editor_state.screen_bottom1 = {} - replacement in source_text_tests.lua at line 917
edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cacheedit.draw(Editor_state) -- populate line_cache.startpos for each line - edit in source_text_tests.lua at line 945
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 966
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 981
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1010
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1033
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1067
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1081
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1113
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1134
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1161
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1189
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1216
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1249
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1280
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1301
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1328
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1349
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1376
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1405
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1431
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1455
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1483
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1509
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1537
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1559
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1577
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1606
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1634
Editor_state.screen_bottom1 = {} - replacement in source_text_tests.lua at line 1644
edit.run_after_keychord(Editor_state, 'right', 'right')edit.run_after_keychord(Editor_state, 'right', 'right') - edit in source_text_tests.lua at line 1663
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1691
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1721
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1754
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1781
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1915
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1949
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 1987
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 2007
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 2033
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 2050
Editor_state.screen_bottom1 = {} - edit in source_text_tests.lua at line 2067
Editor_state.screen_bottom1 = {} - replacement in source_text.lua at line 5
-- return y for the next line, and position of start of final screen line drawn-- return y for the next line - edit in source_text.lua at line 9
line_cache.starty = y - edit in source_text.lua at line 11
local final_screen_line_starting_pos = startpos -- track value to return - edit in source_text.lua at line 25
final_screen_line_starting_pos = pos - replacement in source_text.lua at line 84
return y, final_screen_line_starting_posreturn y - replacement in source_text.lua at line 208
--? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)--? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos) - replacement in source_text.lua at line 241
--? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)--? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos) - replacement in source_text.lua at line 246
--? print('=>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)--? print('=>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos) - replacement in source_text.lua at line 427
--? print('pageup')State.screen_top1 = Text.previous_screen_top1(State)State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary(State)Text.redraw_all(State) -- if we're scrolling, reclaim all fragments to avoid memory leaksend-- return the top y coordinate of a given line_index,-- or nil if no part of it is on screenfunction Text.starty(State, line_index) - replacement in source_text.lua at line 437
local top2 = Text.to2(State, State.screen_top1)--? print(App.screen.height)-- does not modify State (except to populate line_cache)if line_index < State.screen_top1.line then return endlocal loc2 = Text.to2(State, State.screen_top1)local y = State.topwhile true doif State.lines[loc2.line].mode == 'drawing' theny = y + Drawing_padding_topendif loc2.line == line_index then return y endif State.lines[loc2.line].mode == 'text' theny = y + State.line_heightelseif State.lines[loc2.line].mode == 'drawing' theny = y + Drawing.pixels(State.lines[loc2.line].h, State.width) + Drawing_padding_bottomendif y + State.line_height > App.screen.height then break endlocal next_loc2 = Text.next_screen_line(State, loc2)if Text.eq2(next_loc2, loc2) then break end -- end of fileloc2 = next_loc2endendfunction Text.previous_screen_top1(State)-- duplicate some logic from love.draw-- does not modify State (except to populate line_cache)local loc2 = Text.to2(State, State.screen_top1) - replacement in source_text.lua at line 464[9.107782]→[9.107782:107845](∅→∅),[9.107845]→[9.3441:3522](∅→∅),[9.3522]→[9.5040:5103](∅→∅),[9.107952]→[9.5040:5103](∅→∅)
--? print(y, top2.line, top2.screen_line, top2.screen_pos)if State.screen_top1.line == 1 and State.screen_top1.pos == 1 then break endif State.lines[State.screen_top1.line].mode == 'text' thenif loc2.line == 1 and loc2.screen_line == 1 and loc2.screen_pos == 1 then break endif State.lines[loc2.line].mode == 'text' then - replacement in source_text.lua at line 467
elseif State.lines[State.screen_top1.line].mode == 'drawing' theny = y - Drawing_padding_height - Drawing.pixels(State.lines[State.screen_top1.line].h, State.width)elseif State.lines[loc2.line].mode == 'drawing' theny = y - Drawing_padding_height - Drawing.pixels(State.lines[loc2.line].h, State.width) - replacement in source_text.lua at line 470
top2 = Text.previous_screen_line(State, top2)loc2 = Text.previous_screen_line(State, loc2) - replacement in source_text.lua at line 472[9.108038]→[9.108038:108082](∅→∅),[9.108082]→[9.3523:3598](∅→∅),[9.3598]→[9.108186:108394](∅→∅),[9.108186]→[9.108186:108394](∅→∅)
State.screen_top1 = Text.to1(State, top2)State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary(State)--? print(State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)--? print('pageup end')return Text.to1(State, loc2) - replacement in source_text.lua at line 476[9.108429]→[9.108429:108453](∅→∅),[9.108453]→[9.9:94](∅→∅),[9.94]→[9.108728:108805](∅→∅),[9.108728]→[9.108728:108805](∅→∅)
--? print('pagedown')State.screen_top1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}--? print('setting top to', State.screen_top1.line, State.screen_top1.pos)State.screen_top1 = Text.screen_bottom1(State) - edit in source_text.lua at line 479
--? print('top now', State.screen_top1.line) - replacement in source_text.lua at line 480
--? print('pagedown end')end-- return the location of the start of the bottom-most line on screenfunction Text.screen_bottom1(State)-- duplicate some logic from love.draw-- does not modify State (except to populate line_cache)local loc2 = Text.to2(State, State.screen_top1)local y = State.topwhile true doif State.lines[loc2.line].mode == 'text' theny = y + State.line_heightelseif State.lines[loc2.line].mode == 'drawing' theny = y + Drawing_padding_height + Drawing.pixels(State.lines[loc2.line].h, State.width)endif y + State.line_height > App.screen.height then break endlocal next_loc2 = Text.next_screen_line(State, loc2)if Text.eq2(next_loc2, loc2) then break endloc2 = next_loc2endreturn Text.to1(State, loc2) - replacement in source_text.lua at line 547
--? print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)--? print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos) - replacement in source_text.lua at line 564
if State.cursor1.line > State.screen_bottom1.line thenlocal screen_bottom1 = Text.screen_bottom1(State)--? print('down 2', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, screen_bottom1.line, screen_bottom1.pos)if State.cursor1.line > screen_bottom1.line then - replacement in source_text.lua at line 574
local scroll_down = Text.le1(State.screen_bottom1, State.cursor1)local screen_bottom1 = Text.screen_bottom1(State)local scroll_down = Text.le1(screen_bottom1, State.cursor1) - replacement in source_text.lua at line 591
--? print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)--? print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos) - edit in source_text.lua at line 728
assert(State.lines[loc1.line].mode == 'text') - edit in source_text.lua at line 740
endfunction Text.final_text_loc_on_screen(State)local screen_bottom1 = Text.screen_bottom1(State)if State.lines[screen_bottom1.line].mode == 'text' thenreturn {line=screen_bottom1.line,pos=Text.pos_at_end_of_screen_line(State, screen_bottom1),}endlocal loc2 = Text.to2(State, screen_bottom1)while true doif State.lines[loc2.line].mode == 'text' then break endassert(loc2.line > 1 or loc2.screen_line > 1 and loc2.screen_pos > 1) -- elsewhere we're making sure there's always at least one text line on screenloc2 = Text.previous_screen_line(State, loc2)endlocal result = Text.to1(State, loc2)result.pos = Text.pos_at_end_of_screen_line(State, result)return result - replacement in source_text.lua at line 801
--? print('snap', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)--? print('snap', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos) - replacement in source_text.lua at line 831
--? print('snap =>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)--? print('snap =>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos) - replacement in source_text.lua at line 838
if line_cache.starty == nil then return false end -- outside current pageif y < line_cache.starty then return false endlocal starty = Text.starty(State, line_index)if starty == nil then return false end -- outside current pageif y < starty then return false end - replacement in source_text.lua at line 842
return y < line_cache.starty + State.line_height*(#line_cache.screen_line_starting_pos - Text.screen_line_index(line_cache.screen_line_starting_pos, line_cache.startpos) + 1)return y < starty + State.line_height*(#line_cache.screen_line_starting_pos - Text.screen_line_index(line_cache.screen_line_starting_pos, line_cache.startpos) + 1) - replacement in source_text.lua at line 849
assert(my >= line_cache.starty, 'failed to map y pixel to line')local starty = Text.starty(State, line_index)assert(my >= starty, 'failed to map y pixel to line') - replacement in source_text.lua at line 852
local y = line_cache.startylocal y = starty - edit in source_text.lua at line 1036
endfunction Text.eq2(a, b)return a.line == b.line and a.screen_line == b.screen_line and a.screen_pos == b.screen_pos - edit in source_text.lua at line 1065
function Text.next_screen_line(State, loc2)if State.lines[loc2.line].mode == 'drawing' thenreturn {line=loc2.line+1, screen_line=1, screen_pos=1}endText.populate_screen_line_starting_pos(State, loc2.line)if loc2.screen_line >= #State.line_cache[loc2.line].screen_line_starting_pos thenif loc2.line < #State.lines thenreturn {line=loc2.line+1, screen_line=1, screen_pos=1}elsereturn loc2endelsereturn {line=loc2.line, screen_line=loc2.screen_line+1, screen_pos=1}endend - edit in source_text.lua at line 1104
local screen_bottom1 = Text.screen_bottom1(State) - replacement in source_text.lua at line 1107
elseif State.cursor1.line >= State.screen_bottom1.line then--? print('too low')elseif State.cursor1.line >= screen_bottom1.line then - replacement in source_text.lua at line 1109
--? print('tweak')State.cursor1 = {line=State.screen_bottom1.line,pos=Text.to_pos_on_line(State, State.screen_bottom1.line, State.right-5, App.screen.height-5),}State.cursor1 = Text.final_text_loc_on_screen(State) - edit in source_text.lua at line 1118
-- this approach is cheaper and almost works, except on the final screen-- where file ends above bottom of screen--? local botpos = Text.pos_at_start_of_screen_line(State, State.cursor1)--? local botline1 = {line=State.cursor1.line, pos=botpos}--? return Text.lt1(State.screen_bottom1, botline1) - edit in source_edit.lua at line 36
-- a (y) coord in pixels (updated while painting screen), - edit in source_edit.lua at line 56
-- starty, the y coord in pixels the line starts rendering from - edit in source_edit.lua at line 69
---- On lines that are drawings, pos will be nil. - replacement in source_edit.lua at line 72
cursor1 = {line=1, pos=1}, -- position of cursorscreen_bottom1 = {line=1, pos=1}, -- position of start of screen line at bottom of screencursor1 = {line=1, pos=1}, -- position of cursor; must be on a text line - edit in source_edit.lua at line 167
local screen_bottom1 = {line=nil, pos=nil} - edit in source_edit.lua at line 172
screen_bottom1.line = line_index - replacement in source_edit.lua at line 198
y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers)y = Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers) - edit in source_edit.lua at line 208
State.screen_bottom1 = screen_bottom1 - replacement in source_edit.lua at line 280
local line_cache = State.line_cache[line_index]if Drawing.in_drawing(line, line_cache, x, y, State.left,State.right) thenif Drawing.in_drawing(State, line_index, x, y, State.left,State.right) then - replacement in source_edit.lua at line 294
State.selection1 = {line=State.screen_bottom1.line,pos=Text.pos_at_end_of_screen_line(State, State.screen_bottom1),}State.selection1 = Text.final_text_loc_on_screen(State) - replacement in source_edit.lua at line 332
State.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)State.cursor1 = Text.final_text_loc_on_screen(State) - replacement in source_edit.lua at line 360
State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}State.cursor1 = Text.screen_bottom1(State) - replacement in source_edit.lua at line 394
chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(chord) thenchord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(key) then - edit in source_edit.lua at line 398
for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll - edit in source_edit.lua at line 502
-- DON'T reset line_cache.starty here - edit in source_edit.lua at line 538
for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll - edit in source_edit.lua at line 592
edit.draw(State) - edit in source.lua at line 310
for _,line_cache in ipairs(Editor_state.line_cache) do line_cache.starty = nil end -- just in case we scroll - replacement in help.lua at line 3
local line_cache = State.line_cache[drawing_index]local starty = Text.starty(State, drawing_index) - replacement in help.lua at line 5
local y = line_cache.starty+10local y = starty+10 - replacement in help.lua at line 51
love.graphics.rectangle('fill', State.left,line_cache.starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-line_cache.starty))love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty)) - replacement in help.lua at line 56
local line_cache = State.line_cache[drawing_index]local starty = Text.starty(State, drawing_index) - replacement in help.lua at line 58
local y = line_cache.starty+10local y = starty+10 - replacement in help.lua at line 132
love.graphics.rectangle('fill', State.left,line_cache.starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-line_cache.starty))love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty)) - edit in help.lua at line 147[9.9454]→[9.3567:3567](∅→∅),[9.120]→[9.3653:3704](∅→∅),[9.120]→[9.3653:3704](∅→∅),[9.313]→[9.3705:3727](∅→∅),[9.313]→[9.3705:3727](∅→∅),[9.349]→[9.3728:3853](∅→∅),[9.349]→[9.3728:3853](∅→∅),[9.461]→[9.3854:3905](∅→∅),[9.461]→[9.3854:3905](∅→∅),[9.374]→[9.3906:3928](∅→∅),[9.374]→[9.3906:3928](∅→∅),[9.410]→[9.3929:4054](∅→∅),[9.410]→[9.3929:4054](∅→∅)
local starty = Text.starty(State, drawing_index)local y = starty+10love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty))local starty = Text.starty(State, drawing_index)local y = starty+10love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty)) - resolve order conflict in help.lua at line 147
- edit in edit.lua at line 110
local screen_bottom1 = {line=nil, pos=nil} - edit in edit.lua at line 115
screen_bottom1.line = line_index - replacement in edit.lua at line 120
y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos)y = Text.draw(State, line_index, y, startpos) - edit in edit.lua at line 123
State.screen_bottom1 = screen_bottom1 - replacement in edit.lua at line 194
State.selection1 = {line=State.screen_bottom1.line,pos=Text.pos_at_end_of_screen_line(State, State.screen_bottom1),}State.selection1 = Text.final_text_loc_on_screen(State) - replacement in edit.lua at line 220
State.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)State.cursor1 = Text.final_text_loc_on_screen(State) - replacement in edit.lua at line 246
State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}State.cursor1 = Text.screen_bottom1(State)edit.put_cursor_on_next_text_line(State) - edit in edit.lua at line 274
for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll - edit in edit.lua at line 374
for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll - edit in edit.lua at line 428
edit.draw(State) - edit in edit.lua at line 451[9.12430]→[5.178:178](∅→∅),[9.182]→[9.8618:8665](∅→∅),[9.182]→[9.8618:8665](∅→∅),[9.5239]→[9.8565:8617](∅→∅),[9.5239]→[9.8565:8617](∅→∅),[9.8089]→[9.4055:4137](∅→∅),[9.8089]→[9.4055:4137](∅→∅),[9.834]→[9.1152:1171](∅→∅),[9.834]→[9.1152:1171](∅→∅),[9.3196]→[9.1094:1151](∅→∅),[9.3196]→[9.1094:1151](∅→∅),[9.2459]→[9.1035:1093](∅→∅),[9.2459]→[9.1035:1093](∅→∅)
State.cursor1 = Text.screen_bottom1(State)y = Text.draw(State, line_index, y, startpos)if Drawing.in_drawing(State, line_index, x, y, State.left,State.right) thenedit.draw(State)State.cursor1 = Text.final_text_loc_on_screen(State)State.selection1 = Text.final_text_loc_on_screen(State) - resolve order conflict in edit.lua at line 451[9.12430]
- replacement in drawing_tests.lua at line 6
App.screen.init{width=120, height=60}App.screen.init{width=800, height=600} - edit in drawing_tests.lua at line 16
App.screen.init{width=800, height=600} - resolve order conflict in drawing_tests.lua at line 16
- edit in drawing_tests.lua at line 35
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y') - resurrect zombie in drawing_tests.lua at line 36
check_eq(Editor_state.lines[1].h, 128, 'baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'baseline/#shapes') - replacement in drawing_tests.lua at line 80
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - replacement in drawing_tests.lua at line 108
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - replacement in drawing_tests.lua at line 137
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - replacement in drawing_tests.lua at line 175
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - replacement in drawing_tests.lua at line 203
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - replacement in drawing_tests.lua at line 234
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - replacement in drawing_tests.lua at line 272
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - replacement in drawing_tests.lua at line 316
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - replacement in drawing_tests.lua at line 352
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - edit in drawing_tests.lua at line 398[9.24482]→[9.5415:5415](∅→∅),[9.49651]→[9.4232:4325](∅→∅),[9.49651]→[9.4232:4325](∅→∅),[9.50255]→[9.4326:4419](∅→∅),[9.50255]→[9.4326:4419](∅→∅),[9.50865]→[9.4420:4513](∅→∅),[9.50865]→[9.4420:4513](∅→∅),[9.51319]→[9.4514:4607](∅→∅),[9.51319]→[9.4514:4607](∅→∅),[9.51929]→[9.4608:4701](∅→∅),[9.51929]→[9.4608:4701](∅→∅),[9.52698]→[9.4702:4795](∅→∅),[9.52698]→[9.4702:4795](∅→∅),[9.53464]→[9.4796:4889](∅→∅),[9.53464]→[9.4796:4889](∅→∅),[9.54331]→[9.4890:4983](∅→∅),[9.54331]→[9.4890:4983](∅→∅),[9.55046]→[9.4984:5077](∅→∅),[9.55046]→[9.4984:5077](∅→∅)
check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y') - resolve order conflict in drawing_tests.lua at line 398
- edit in drawing.lua at line 9
local line_cache = State.line_cache[line_index]line_cache.starty = y - replacement in drawing.lua at line 10
if pmx < State.right and pmy > line_cache.starty and pmy < line_cache.starty+Drawing.pixels(line.h, State.width) thenlocal starty = Text.starty(State, line_index)if pmx < State.right and pmy > starty and pmy < starty+Drawing.pixels(line.h, State.width) then - replacement in drawing.lua at line 13
love.graphics.rectangle('line', State.left,line_cache.starty, State.width,Drawing.pixels(line.h, State.width))love.graphics.rectangle('line', State.left,starty, State.width,Drawing.pixels(line.h, State.width)) - replacement in drawing.lua at line 15
icon[State.current_drawing_mode](State.right-22, line_cache.starty+4)icon[State.current_drawing_mode](State.right-22, starty+4) - replacement in drawing.lua at line 17
icon[State.previous_drawing_mode](State.right-22, line_cache.starty+4)icon[State.previous_drawing_mode](State.right-22, starty+4) - replacement in drawing.lua at line 32
local my = Drawing.coord(pmy-line_cache.starty, State.width)local my = Drawing.coord(pmy-starty, State.width) - replacement in drawing.lua at line 40
Drawing.draw_shape(line, shape, line_cache.starty, State.left,State.right)Drawing.draw_shape(line, shape, starty, State.left,State.right) - replacement in drawing.lua at line 44
local function py(y) return Drawing.pixels(y, State.width)+line_cache.starty endlocal function py(y) return Drawing.pixels(y, State.width)+starty end - replacement in drawing.lua at line 73
Drawing.draw_pending_shape(line, line_cache.starty, State.left,State.right)Drawing.draw_pending_shape(line, starty, State.left,State.right) - edit in drawing.lua at line 126[9.14879]→[9.8837:8837](∅→∅),[9.1580]→[9.5078:5224](∅→∅),[9.1580]→[9.5078:5224](∅→∅),[9.1052]→[9.5225:5329](∅→∅),[9.1052]→[9.5225:5329](∅→∅),[9.363]→[9.5330:5395](∅→∅),[9.363]→[9.5330:5395](∅→∅),[9.532]→[9.5396:5462](∅→∅),[9.532]→[9.5396:5462](∅→∅),[9.73]→[9.5463:5515](∅→∅),[9.73]→[9.5463:5515](∅→∅),[9.1083]→[9.5516:5584](∅→∅),[9.1083]→[9.5516:5584](∅→∅),[9.93]→[9.5585:5657](∅→∅),[9.93]→[9.5585:5657](∅→∅),[9.1279]→[9.5658:5725](∅→∅),[9.1279]→[9.5658:5725](∅→∅)
local starty = Text.starty(State, line_index)if pmx < State.right and pmy > starty and pmy < starty+Drawing.pixels(line.h, State.width) thenlove.graphics.rectangle('line', State.left,starty, State.width,Drawing.pixels(line.h, State.width))icon[State.current_drawing_mode](State.right-22, starty+4)icon[State.previous_drawing_mode](State.right-22, starty+4)local my = Drawing.coord(pmy-starty, State.width)Drawing.draw_shape(line, shape, starty, State.left,State.right)local function py(y) return Drawing.pixels(y, State.width)+starty endDrawing.draw_pending_shape(line, starty, State.left,State.right) - resolve order conflict in drawing.lua at line 126
- edit in drawing.lua at line 209
endfunction Drawing.in_drawing(drawing, line_cache, x,y, left,right)if line_cache.starty == nil then return false end -- outside current pagelocal width = right-leftreturn y >= line_cache.starty and y < line_cache.starty + Drawing.pixels(drawing.h, width) and x >= left and x < right - edit in drawing.lua at line 211
- resurrect zombie in drawing.lua at line 211[9.646]→[9.5726:6150](∅→∅),[9.646]→[9.5726:6150](∅→∅),[9.5462]→[9.6151:6250](∅→∅),[9.5462]→[9.6151:6250](∅→∅)
function Drawing.in_current_drawing(State, x,y, left,right)return Drawing.in_drawing(State, State.lines.current_drawing_index, x,y, left,right)endfunction Drawing.in_drawing(State, line_index, x,y, left,right)assert(State.lines[line_index].mode == 'drawing')local starty = Text.starty(State, line_index)if starty == nil then return false end -- outside current pagelocal drawing = State.lines[line_index]return y >= starty and y < starty + Drawing.pixels(drawing.h, width) and x >= left and x < right - resolve order conflict in drawing.lua at line 211
- edit in drawing.lua at line 220
local width = right-left - edit in drawing.lua at line 222
end - replacement in drawing.lua at line 226
local line_cache = State.line_cache[drawing_index]local starty = Text.starty(State, drawing_index) - replacement in drawing.lua at line 228
local cy = Drawing.coord(y-line_cache.starty, State.width)local cy = Drawing.coord(y-starty, State.width) - edit in drawing.lua at line 241[9.2735]→[9.6251:6302](∅→∅),[9.2735]→[9.6251:6302](∅→∅),[9.71]→[9.6303:6353](∅→∅),[9.71]→[9.6303:6353](∅→∅)
local starty = Text.starty(State, drawing_index)local cy = Drawing.coord(y-starty, State.width) - resolve order conflict in drawing.lua at line 241
- replacement in drawing.lua at line 253
local line_cache = State.line_cache[State.lines.current_drawing_index]if line_cache.starty == nil thenlocal starty = Text.starty(State, State.lines.current_drawing_index)if starty == nil then - replacement in drawing.lua at line 263
local my = Drawing.coord(pmy-line_cache.starty, State.width)local my = Drawing.coord(pmy-starty, State.width) - replacement in drawing.lua at line 265
if Drawing.in_drawing(drawing, line_cache, pmx,pmy, State.left,State.right) thenif Drawing.in_current_drawing(State, pmx,pmy, State.left,State.right) then - replacement in drawing.lua at line 275
if Drawing.in_drawing(drawing, line_cache, pmx, pmy, State.left,State.right) thenif Drawing.in_current_drawing(State, pmx, pmy, State.left,State.right) then - edit in drawing.lua at line 303[9.21692]→[9.9069:9069](∅→∅),[9.179]→[9.6354:6449](∅→∅),[9.179]→[9.6354:6449](∅→∅),[9.179]→[9.6354:6449](∅→∅),[9.134]→[9.6450:6502](∅→∅),[9.134]→[9.6450:6502](∅→∅),[9.1613]→[9.6503:6582](∅→∅),[9.1613]→[9.6503:6582](∅→∅),[9.457]→[9.6583:6663](∅→∅),[9.457]→[9.6583:6663](∅→∅)
local starty = Text.starty(State, State.lines.current_drawing_index)if starty == nil thenlocal my = Drawing.coord(pmy-starty, State.width)if Drawing.in_current_drawing(State, pmx,pmy, State.left,State.right) thenif Drawing.in_current_drawing(State, pmx, pmy, State.left,State.right) then - resolve order conflict in drawing.lua at line 303
- replacement in drawing.lua at line 313
local line_cache = State.line_cache[State.lines.current_drawing_index]local starty = Text.starty(State, State.lines.current_drawing_index) - replacement in drawing.lua at line 322
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - replacement in drawing.lua at line 329
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - replacement in drawing.lua at line 337
App.mouse_move(State.left+Drawing.pixels(p2.x, State.width), line_cache.starty+Drawing.pixels(p2.y, State.width))App.mouse_move(State.left+Drawing.pixels(p2.x, State.width), starty+Drawing.pixels(p2.y, State.width)) - replacement in drawing.lua at line 341
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - replacement in drawing.lua at line 349
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - replacement in drawing.lua at line 364
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - replacement in drawing.lua at line 375
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - replacement in drawing.lua at line 382
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - edit in drawing.lua at line 399[9.27152]→[9.9377:9377](∅→∅),[9.487]→[9.6664:6737](∅→∅),[9.487]→[9.6664:6737](∅→∅),[9.227]→[9.6738:6839](∅→∅),[9.227]→[9.6738:6839](∅→∅),[9.627]→[9.6840:6941](∅→∅),[9.627]→[9.6840:6941](∅→∅),[9.1032]→[9.6942:7055](∅→∅),[9.1032]→[9.6942:7055](∅→∅),[9.1231]→[9.7056:7157](∅→∅),[9.1231]→[9.7056:7157](∅→∅),[9.1668]→[9.7158:7261](∅→∅),[9.1668]→[9.7158:7261](∅→∅),[9.2366]→[9.7262:7365](∅→∅),[9.2366]→[9.7262:7365](∅→∅),[9.2970]→[9.7366:7467](∅→∅),[9.2970]→[9.7366:7467](∅→∅),[9.3348]→[9.7468:7569](∅→∅),[9.3348]→[9.7468:7569](∅→∅)
local starty = Text.starty(State, State.lines.current_drawing_index)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)App.mouse_move(State.left+Drawing.pixels(p2.x, State.width), starty+Drawing.pixels(p2.y, State.width))local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - resolve order conflict in drawing.lua at line 399
- replacement in drawing.lua at line 486
local _,drawing,line_cache = Drawing.current_drawing(State)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-line_cache.starty, State.width)local drawing_index,drawing = Drawing.current_drawing(State)local starty = Text.starty(State, drawing_index)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-starty, State.width) - replacement in drawing.lua at line 492
local _,drawing,line_cache = Drawing.current_drawing(State)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-line_cache.starty, State.width)local drawing_index,drawing = Drawing.current_drawing(State)local starty = Text.starty(State, drawing_index)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-starty, State.width) - replacement in drawing.lua at line 503
local _,drawing,line_cache = Drawing.current_drawing(State)local drawing_index,drawing = Drawing.current_drawing(State)local starty = Text.starty(State, drawing_index) - replacement in drawing.lua at line 506
local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-line_cache.starty, State.width)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-starty, State.width) - replacement in drawing.lua at line 522
local drawing_index,drawing,line_cache,i,p = Drawing.select_point_at_mouse(State)local drawing_index,drawing,_,i,p = Drawing.select_point_at_mouse(State) - replacement in drawing.lua at line 533
local drawing_index,drawing,line_cache,point_index,p = Drawing.select_point_at_mouse(State)local drawing_index,drawing,_,point_index,p = Drawing.select_point_at_mouse(State) - replacement in drawing.lua at line 631
local line_cache = State.line_cache[drawing_index]if Drawing.in_drawing(drawing, line_cache, x,y, State.left,State.right) thenreturn drawing_index,drawing,line_cacheif Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) thenreturn drawing_index,drawing - replacement in drawing.lua at line 643
local line_cache = State.line_cache[drawing_index]if Drawing.in_drawing(drawing, line_cache, x,y, State.left,State.right) thenlocal mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local starty = Text.starty(State, drawing_index)if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) thenlocal mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - replacement in drawing.lua at line 648
return drawing,line_cache,i,shapereturn drawing,starty,i,shape - replacement in drawing.lua at line 660
local line_cache = State.line_cache[drawing_index]if Drawing.in_drawing(drawing, line_cache, x,y, State.left,State.right) thenlocal mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local starty = Text.starty(State, drawing_index)if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) thenlocal mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width) - replacement in drawing.lua at line 665
return drawing_index,drawing,line_cache,i,pointreturn drawing_index,drawing,starty,i,point - replacement in drawing.lua at line 677
local line_cache = State.line_cache[drawing_index]if Drawing.in_drawing(drawing, line_cache, x,y, State.left,State.right) thenif Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then - edit in drawing.lua at line 751[9.42200]→[9.3679:3679](∅→∅),[9.690]→[9.7570:7809](∅→∅),[9.690]→[9.7570:7809](∅→∅),[9.936]→[9.7810:8049](∅→∅),[9.936]→[9.7810:8049](∅→∅),[9.1177]→[9.8050:8168](∅→∅),[9.1177]→[9.8050:8168](∅→∅),[9.7258]→[9.8169:8290](∅→∅),[9.7258]→[9.8169:8290](∅→∅),[9.2665]→[9.8291:8368](∅→∅),[9.2665]→[9.8291:8368](∅→∅),[9.2771]→[9.8369:8456](∅→∅),[9.2771]→[9.8369:8456](∅→∅),[9.19238]→[9.8457:8578](∅→∅),[9.19238]→[9.8457:8578](∅→∅),[9.4159]→[9.8579:8819](∅→∅),[9.4159]→[9.8579:8819](∅→∅),[9.19928]→[9.8820:8862](∅→∅),[9.19928]→[9.8820:8862](∅→∅),[9.4208]→[9.8863:9103](∅→∅),[9.4208]→[9.8863:9103](∅→∅),[9.8465]→[9.9104:9160](∅→∅),[9.8465]→[9.9104:9160](∅→∅),[9.4257]→[9.9161:9245](∅→∅),[9.4257]→[9.9161:9245](∅→∅)
local drawing_index,drawing = Drawing.current_drawing(State)local starty = Text.starty(State, drawing_index)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-starty, State.width)local drawing_index,drawing = Drawing.current_drawing(State)local starty = Text.starty(State, drawing_index)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-starty, State.width)local drawing_index,drawing = Drawing.current_drawing(State)local starty = Text.starty(State, drawing_index)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-starty, State.width)local drawing_index,drawing,_,i,p = Drawing.select_point_at_mouse(State)local drawing_index,drawing,_,point_index,p = Drawing.select_point_at_mouse(State)if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) thenreturn drawing_index,drawinglocal starty = Text.starty(State, drawing_index)if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) thenlocal mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)return drawing,starty,i,shapelocal starty = Text.starty(State, drawing_index)if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) thenlocal mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)return drawing_index,drawing,starty,i,pointif Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then - resolve order conflict in drawing.lua at line 751[9.42200]
- edit in README.md at line 56
* If you ever see a crash when clicking on the mouse, it might be because amouse press and release need to happen in separate frames. Try pressing andreleasing more slowly and let me know if that helps or not. This is klunky,sorry.