bring a few things in sync between run and source
[?]
Mar 18, 2023, 4:18 AM
LDFXFRUOUESGMZ7Z6BCZUQFRFFRIAB67GSGN2BR2VLT2ONZPUV3QCDependencies
- [2]
5BMR5HRTclick to the left of a line - [3]
UN7GKYV5support hyperlinks in the source editor - [4]
LNUHQOGHstart passing in Editor_state explicitly - [5]
KKMFQDR4editing source code from within the app - [6]
UHB4GARJleft/right margin -> left/right coordinates - [7]
4KC7I3E2make colors easier to edit - [8]
OI4FPFINsupport drawings in the source editor - [9]
ZJOSQFN6bugfix: path munging on Windows - [10]
ILOA5BYFseparate data structure for each line's cache data - [11]
TGHAJBESuse line cache for drawings as well - [12]
KYNGDE2Cconsistent names in a few more places - [*]
2L5MEZV3experiment: new edit namespace
Change contents
- replacement in source_text.lua at line 1724
function starts_with(s, sub)return s:find(sub, 1, --[[no escapes]] true) == 1function starts_with(s, prefix)if #s < #prefix thenreturn falseendfor i=1,#prefix doif s:sub(i,i) ~= prefix:sub(i,i) thenreturn falseendendreturn true - replacement in source_text.lua at line 1736
function ends_with(s, sub)return s:reverse():find(sub:reverse(), 1, --[[no escapes]] true) == 1function ends_with(s, suffix)if #s < #suffix thenreturn falseendfor i=0,#suffix-1 doif s:sub(#s-i,#s-i) ~= suffix:sub(#suffix-i,#suffix-i) thenreturn falseendendreturn true - replacement in source_edit.lua at line 99
left = left,right = right,left = math.floor(left),right = math.floor(right), - edit in source_edit.lua at line 230
-- give some time for the OS to flush everything to disklove.timer.sleep(0.1) - replacement in source_edit.lua at line 237
--? print('press')--? print('press', State.selection1.line, State.selection1.pos) - replacement in edit.lua at line 146
assert(#State.lines == #State.line_cache)if #State.lines ~= #State.line_cache thenprint(('line_cache is out of date; %d when it should be %d'):format(#State.line_cache, #State.lines))assert(false)end