resolve conflicts
Dependencies
- [2]
PZYSWJZCresolve conflicts - [3]
T4FRZSYLdelete an ancient, unused file - [4]
5OVKHVY6nice way to make on.* handlers more discoverable - [5]
QMRQL2FOresolve conflicts - [6]
XX7G2FFJintermingle freehand line drawings with text - [7]
66X36NZNa little more prose describing manual_tests - [8]
CZQ3NJ4NMerge text0 - [9]
OGUV4HSAremove some memory leaks from rendered fragments - [10]
D43U7GQ4alter on-disk representation (manifest files) - [11]
5SM6DRHKport inscript's bugfix to source editor - [12]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [13]
PJ5PQAQErecord support for multiple versions - [14]
FS2ITYYHrecord a known issue - [15]
X43ZIKR3Merge text.love - [16]
UEG224LHdebug animations - [17]
ED4Z6ORCcleaner API for file-system access - [18]
VSGPLJFAresolve conflicts - [19]
ZS5IYZH5stop caching screen_bottom1 - [20]
CRBLAWBOresolve conflicts - [21]
2CFLXLIEMerge text.love - [22]
BLWAYPKVextract a module - [23]
6LJZN727handle chords - [24]
RSZD5A7Gforgot to add json.lua - [25]
KMSL74GAsupport selections in the source editor - [26]
KKQKPGCIresolve conflicts - [27]
SW5GN5LPsuggest a default layout for freewheeling apps - [28]
G3DLS5OUaudit all asserts - [29]
RXMHAZ6Vresolve conflicts - [30]
6TBU3VTNexplicitly state when operations manage undo - [31]
TVCPXAAUrename - [32]
LRDM35CEapp running again - [33]
4Y2QDDAZresolve conflicts - [34]
VP5KC4XZMerge lines.love - [35]
OL7ZCZWDMerge text.love - [36]
4SR3Z4Y3document the version of LÖVE I've been using - [37]
52YBYUCOresolve conflicts - [38]
PCHTG7YUresolve conflicts - [39]
SGMA5JLEsave the list of tests in repo - [40]
73OCE2MCafter much struggle, a brute-force undo - [41]
KKMFQDR4editing source code from within the app - [42]
4YDBYBA4clean up memory leak experiments - [43]
FBBHEUQNresolve conflicts - [44]
VHQCNMARseveral more modules - [45]
VXRYVZ74Merge text.love - [46]
CAG7PP5YMerge text.love - [47]
TOXPJJYYresolve conflicts - [48]
LXTTOB33extract a couple of files - [49]
EZHO4TSWnew file-system format for freewheeling apps - [50]
AVTNUQYRbasic test-enabled framework - [51]
N2NUGNN4include a brief reference enabling many useful apps - [52]
VLTU33KWresolve conflicts - [53]
3QNOKBFMbeginnings of a test harness - [54]
4J3Y3DJWpijul bug: redo upstream change - [55]
KQ22RW43resolve conflicts - [56]
R5QXEHUIsomebody stop me - [57]
36Z442IVback to commit 8123959e52f without code editing - [58]
ZLJYLPOTMerge lines.love - [59]
JOPVPUSAediting source code from within the app - [60]
LWPFEZBIMerge lines.love - [61]
TBTRYEBPMerge lines.love - [62]
ORKN6EOBMerge lines.love - [63]
2DVVKKVAflesh out Readme - [64]
JCRUUD2SMerge text.love - [65]
3PSFWAILMerge lines.love - [66]
CE4LZV4Tdrop last couple of manual tests - [67]
HWTLXESCMerge lines.love - [68]
6VJTQKW7start supporting LÖVE v12 - [69]
KJLZCK2Rresolve conflicts - [70]
MBAJPTDJresolve conflicts - [71]
K2X6G75Zstart writing some tests for drawings - [72]
QZUFJMD5resolve conflicts - [73]
57HKHZ7Zinclude the tool that's mentioned in representation.md - [74]
OTIBCAUJlove2d scaffold - [75]
2L5MEZV3experiment: new edit namespace - [76]
D4B52CQ2Merge lines.love - [77]
D2GCFTTTclean up repl functionality - [78]
TLOAPLBJadd a license - [79]
BDUAJA6Tresolve conflicts - [80]
VXORMHMEdelete experimental REPL - [81]
R6MNUXDJpijul bug - [82]
VHUNJHXBMerge lines.love - [83]
BULPIBEGbeginnings of a module for the text editor
Change contents
- file deletion: source_select.lua source_select.lua
function Text.cut_selection_and_record_undo_event(State)Text.delete_selection_and_record_undo_event(State)function Text.delete_selection_and_record_undo_event(State)if State.selection1.line == nil then return endlocal minl,maxl = minmax(State.selection1.line, State.cursor1.line)local before = snapshot(State, minl, maxl)Text.delete_selection_without_undo(State)record_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)})endfunction Text.delete_selection_without_undo(State)if State.selection1.line == nil then return end-- min,max = sorted(State.selection1,State.cursor1)local minl,minp = State.selection1.line,State.selection1.poslocal maxl,maxp = State.cursor1.line,State.cursor1.posif minl > maxl thenminl,maxl = maxl,minlminp,maxp = maxp,minpelseif minl == maxl thenif minp > maxp thenminp,maxp = maxp,minpendend-- update State.cursor1 and State.selection1State.cursor1.line = minlState.cursor1.pos = minpif Text.lt1(State.cursor1, State.screen_top1) thenState.screen_top1.line = State.cursor1.lineState.screen_top1.pos = Text.pos_at_start_of_screen_line(State, State.cursor1)endState.selection1 = {}-- delete everything between min (inclusive) and max (exclusive)Text.clear_screen_line_cache(State, minl)local min_offset = Text.offset(State.lines[minl].data, minp)local max_offset = Text.offset(State.lines[maxl].data, maxp)if minl == maxl then--? print('minl == maxl')State.lines[minl].data = State.lines[minl].data:sub(1, min_offset-1)..State.lines[minl].data:sub(max_offset)returnendreturn resultendif State.selection1.line == nil then return endlocal result = Text.selection(State) - file deletion: source_text.lua source_text.lua source_text.lua source_text.lua[3.2]→[3.147125:147164](∅→∅),[3.2]→[3.147125:147164](∅→∅),[3.147164]→[3.83786:83786](∅→∅),[3.2]→[3.147125:147164](∅→∅),[3.2]→[3.147125:147164](∅→∅)
Text.delete_selection_and_record_undo_event(State)Text.delete_selection_and_record_undo_event(State)schedule_save(State)returnendschedule_save(State)returnend - file deletion: source_edit.lua source_edit.lua source_edit.lua source_edit.lua[3.2]→[3.165788:165827](∅→∅),[3.2]→[3.165788:165827](∅→∅),[3.165827]→[3.152503:152503](∅→∅),[3.2]→[3.165788:165827](∅→∅),[3.2]→[3.165788:165827](∅→∅)
Drawing.before = nilText.delete_selection_and_record_undo_event(State)local s = Text.cut_selection_and_record_undo_event(State)if s thenendschedule_save(State)