resolve conflicts
Dependencies
- [2]
A6YCG6F2resolve conflicts - [3]
RXMHAZ6Vresolve conflicts - [4]
73OCE2MCafter much struggle, a brute-force undo - [5]
2L5MEZV3experiment: new edit namespace - [6]
MBAJPTDJresolve conflicts - [7]
VHUNJHXBMerge lines.love - [8]
QMRQL2FOresolve conflicts - [9]
ED4Z6ORCcleaner API for file-system access - [10]
VLTU33KWresolve conflicts - [11]
6LJZN727handle chords - [12]
VSGPLJFAresolve conflicts - [13]
3G723RV5Merge text.love - [14]
N2NUGNN4include a brief reference enabling many useful apps - [15]
OGUV4HSAremove some memory leaks from rendered fragments - [16]
LXTTOB33extract a couple of files - [17]
VP5KC4XZMerge lines.love - [18]
4J3Y3DJWpijul bug: redo upstream change - [19]
BLWAYPKVextract a module - [20]
OTIBCAUJlove2d scaffold - [21]
TVCPXAAUrename - [22]
ORKN6EOBMerge lines.love - [23]
3PSFWAILMerge lines.love - [24]
SGMA5JLEsave the list of tests in repo - [25]
KJLZCK2Rresolve conflicts - [26]
FS2ITYYHrecord a known issue - [27]
PJ5PQAQErecord support for multiple versions - [28]
VXRYVZ74Merge text.love - [29]
ULEQ62Z7resolve conflicts - [30]
RSZD5A7Gforgot to add json.lua - [31]
R6MNUXDJpijul bug - [32]
VXORMHMEdelete experimental REPL - [33]
TLOAPLBJadd a license - [34]
TBTRYEBPMerge lines.love - [35]
4Y2QDDAZresolve conflicts - [36]
XX7G2FFJintermingle freehand line drawings with text - [37]
T4FRZSYLdelete an ancient, unused file - [38]
JOPVPUSAediting source code from within the app - [39]
3QNOKBFMbeginnings of a test harness - [40]
LWPFEZBIMerge lines.love - [41]
D2GCFTTTclean up repl functionality - [42]
4SR3Z4Y3document the version of LÖVE I've been using - [43]
BULPIBEGbeginnings of a module for the text editor - [44]
36Z442IVback to commit 8123959e52f without code editing - [45]
R5QXEHUIsomebody stop me - [46]
6VJTQKW7start supporting LÖVE v12 - [47]
CAG7PP5YMerge text.love - [48]
2CTN2IEFMerge lines.love - [49]
KKMFQDR4editing source code from within the app - [50]
CRBLAWBOresolve conflicts - [51]
SCOXD4EOMerge lines.love - [52]
ZLJYLPOTMerge lines.love - [53]
KMSL74GAsupport selections in the source editor - [54]
K2X6G75Zstart writing some tests for drawings - [55]
AT3LVCMPMerge text.love - [56]
TYLURRX3resolve conflicts - [57]
VHQCNMARseveral more modules - [58]
6Z6WH62Wresolve conflicts - [59]
2TQUKHBCMerge lines.love - [60]
2CFLXLIEMerge text.love - [61]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [62]
66X36NZNa little more prose describing manual_tests - [63]
TOXPJJYYresolve conflicts - [64]
AVTNUQYRbasic test-enabled framework - [65]
KKQKPGCIresolve conflicts - [66]
CE4LZV4Tdrop last couple of manual tests - [67]
4YDBYBA4clean up memory leak experiments
Change contents
- file deletion: source_undo.lua source_undo.lua
table.insert(event.lines, deepcopy(State.lines[i]))endreturn eventendfunction patch(lines, from, to)--? if #from.lines == 1 and #to.lines == 1 then--? assert(from.start_line == from.end_line)--? assert(to.start_line == to.end_line)--? assert(from.start_line == to.start_line)--? lines[from.start_line] = to.lines[1]--? return--? end - file deletion: source_text.lua source_text.lua
Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaksText.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaksText.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaksText.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaksText.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaksText.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks--? print('clearing line caches')-- Perform some early sanity checking here, in hopes that we correctly call-- this whenever we change editor state.if State.right <= State.left thenassert(false, ('Right margin %d must be to the right of the left margin %d'):format(State.right, State.left))endendfunction Text.in_line(State, line_index, x,y)local line = State.lines[line_index]local line_cache = State.line_cache[line_index]endendendendend-- 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)end-- 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)endText.clear_screen_line_cache(State, State.cursor1.line) - file deletion: source_edit.lua source_edit.lua
-- screen_line_starting_pos: optional array of codepoint indices if it wraps over more than one screen lineText.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaksText.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaksText.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaksschedule_save(State)end-- clipboardschedule_save(State)endelseif chord == 'C-y' thenelseif chord == 'return' thenState.search_term = nilline_cache = {},-- Given wrapping, any potential location for the text cursor can be described in two ways:-- * schema 1: As a combination of line index and position within a line (in utf8 codepoint units)-- * schema 2: As a combination of line index, screen line index within the line, and a position within the screen line.