start uppercasing globals
[?]
May 18, 2022, 2:27 AM
MGOQ5XAVFTWZPBG2O5ZTGSEKU6BRJKQZLDV6CM4737VD2FAEB5JQCDependencies
- [2]
M36DBSDEbit more polish to help screen - [3]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [4]
Z4KNS42Nto open a file without a terminal, drag it on! - [5]
VVXVV2D2change data model; text can now have metadata - [6]
V5TP27FPctrl-+ and ctrl-- to adjust font size - [7]
PWHZPJJMalways show current filename in window title - [8]
6F6DF5T3. - [9]
QU7NHFOVshow cursor - [10]
XJ5J7LDIstart imposing some organization - [11]
SNDZOK6Qslightly less strange now that we have the same two ways to move points as any other operation - [12]
JS6JSYOTonline contextual help - [13]
YKRF5V3Zstarting to load/save - [14]
KCIM5UTVrevert: back to freehand - [15]
QW5KQQTDfix a comment - [16]
HDCVGN6Gsave each line's y coordinate, whether it's a drawing or not - [17]
IHG5RXP5allow text to be typed while mouse hovers over drawing - [18]
W4UVZETR2 regressions: - [19]
ZOOY3ME4new mode: circle arc - [20]
3XD6M3CFrefactor - [21]
JCSLDGAHbeginnings of support for multiple shapes - [22]
EFMLTMZGbugfix: restrict strokes to the drawing they started in - [23]
U76D4P36fix a typo - [24]
MNWHXPBLmore lightweight; select just the stroke at the mouse - [25]
QCQHLMSTalways have a filename - [26]
IFGAJAF7add a level of indirection to vertices of shapes - [27]
3D5RFWHVstop handling drawings in cursor_pos computations - [28]
XX7G2FFJintermingle freehand line drawings with text - [29]
2INHXC3Kposition cursor by clicking on text - [30]
OTIBCAUJlove2d scaffold - [31]
EDY3RQULgracefully handle a non-existent filename at the commandline - [32]
JVRL5TWLstore device-independent coordinates inside drawings - [33]
OFA3PRBSautosave on keystrokes - [34]
ZUOL7X6Vmove - [35]
UTF73CBLreorg - [36]
TRCAEE2Aclip drawings inside the border - [37]
G77XIN7Mselecting a stroke - [38]
6PUNJS5Bbackspace - [39]
HWPK4SMPnew mode: manhattan - [40]
FMQ74DP3new mode: circle - [41]
WDWXNW7Vslightly strange way to move points - [42]
H7OEU6WPexperimental approach to combining keyboard and mouse while drawing - [43]
4NDYV4WDfix 2 bugs in line selection - [44]
ZD63LJ2Tbugfix: keep the click to create a new drawing from creating a new shape in the drawing - [45]
GCUARQ2Gbugfix: clipping in line and manhattan mode - [46]
5T2E3PDVcouple of bugfixes to file-handling - [47]
NL5J7Z5Hnew mode: polygon - [48]
FBDRL6LHdelete points or shapes - [49]
IYW7X3WLleft/right cursor movement, deleting characters - [50]
3CS5KKCIup/down cursor movement - [51]
6LJZN727handle chords - [52]
RJGZD4INbinary search to most natural up/down with proportional fonts - [53]
TNTYISW6rename - [54]
TEIKBO2Tdon't try to append text to drawings
Change contents
- replacement in main.lua at line 32
lines = {{mode='text', data=''}}Lines = {{mode='text', data=''}} - replacement in main.lua at line 39
cursor_pos = #lines[cursor_line].data+1cursor_pos = #Lines[cursor_line].data+1 - replacement in main.lua at line 74
lines = load_from_disk(filename)for i,line in ipairs(lines) doLines = load_from_disk(filename)for i,line in ipairs(Lines) do - replacement in main.lua at line 86
lines = load_from_file(file)Lines = load_from_file(file) - replacement in main.lua at line 88
for i,line in ipairs(lines) dofor i,line in ipairs(Lines) do - replacement in main.lua at line 102
for i,line in ipairs(lines) dofor i,line in ipairs(Lines) do - replacement in main.lua at line 109
table.insert(lines, i, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})table.insert(Lines, i, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}}) - replacement in main.lua at line 180
if lines.current thenif lines.current.mode == 'drawing' thenlocal drawing = lines.currentif Lines.current thenif Lines.current.mode == 'drawing' thenlocal drawing = Lines.current - replacement in main.lua at line 196
local drawing = lines.currentlocal drawing = Lines.current - replacement in main.lua at line 209
for i,line in ipairs(lines) dofor i,line in ipairs(Lines) do - replacement in main.lua at line 232
lines.current = drawingLines.current = drawing - replacement in main.lua at line 242
elseif lines.current thenif lines.current.pending thenif lines.current.pending.mode == 'freehand' thenelseif Lines.current thenif Lines.current.pending thenif Lines.current.pending.mode == 'freehand' then - replacement in main.lua at line 246[4.1800]→[4.70:136](∅→∅),[4.136]→[4.1800:1855](∅→∅),[4.1800]→[4.1800:1855](∅→∅),[4.1855]→[4.137:440](∅→∅)
table.insert(lines.current.shapes, lines.current.pending)elseif lines.current.pending.mode == 'line' thenlocal mx,my = coord(x-16), coord(y-lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < lines.current.h thenlocal j = insert_point(lines.current.points, mx,my)lines.current.pending.p2 = jtable.insert(lines.current.shapes, lines.current.pending)table.insert(Lines.current.shapes, Lines.current.pending)elseif Lines.current.pending.mode == 'line' thenlocal mx,my = coord(x-16), coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thenlocal j = insert_point(Lines.current.points, mx,my)Lines.current.pending.p2 = jtable.insert(Lines.current.shapes, Lines.current.pending) - replacement in main.lua at line 254
elseif lines.current.pending.mode == 'manhattan' thenlocal p1 = lines.current.points[lines.current.pending.p1]local mx,my = coord(x-16), coord(y-lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < lines.current.h thenelseif Lines.current.pending.mode == 'manhattan' thenlocal p1 = Lines.current.points[Lines.current.pending.p1]local mx,my = coord(x-16), coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h then - replacement in main.lua at line 259
local j = insert_point(lines.current.points, mx, p1.y)lines.current.pending.p2 = jlocal j = insert_point(Lines.current.points, mx, p1.y)Lines.current.pending.p2 = j - replacement in main.lua at line 262
local j = insert_point(lines.current.points, p1.x, my)lines.current.pending.p2 = jlocal j = insert_point(Lines.current.points, p1.x, my)Lines.current.pending.p2 = j - replacement in main.lua at line 265
local p2 = lines.current.points[lines.current.pending.p2]love.mouse.setPosition(16+pixels(p2.x), lines.current.y+pixels(p2.y))table.insert(lines.current.shapes, lines.current.pending)local p2 = Lines.current.points[Lines.current.pending.p2]love.mouse.setPosition(16+pixels(p2.x), Lines.current.y+pixels(p2.y))table.insert(Lines.current.shapes, Lines.current.pending) - replacement in main.lua at line 269
elseif lines.current.pending.mode == 'polygon' thenlocal mx,my = coord(x-16), coord(y-lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < lines.current.h thenlocal j = insert_point(lines.current.points, mx,my)table.insert(lines.current.shapes, lines.current.pending)elseif Lines.current.pending.mode == 'polygon' thenlocal mx,my = coord(x-16), coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thenlocal j = insert_point(Lines.current.points, mx,my)table.insert(Lines.current.shapes, Lines.current.pending) - replacement in main.lua at line 275
table.insert(lines.current.shapes, lines.current.pending)elseif lines.current.pending.mode == 'circle' thenlocal mx,my = coord(x-16), coord(y-lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < lines.current.h thenlocal center = lines.current.points[lines.current.pending.center]lines.current.pending.radius = math.dist(center.x,center.y, mx,my)table.insert(lines.current.shapes, lines.current.pending)table.insert(Lines.current.shapes, Lines.current.pending)elseif Lines.current.pending.mode == 'circle' thenlocal mx,my = coord(x-16), coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thenlocal center = Lines.current.points[Lines.current.pending.center]Lines.current.pending.radius = math.dist(center.x,center.y, mx,my)table.insert(Lines.current.shapes, Lines.current.pending) - replacement in main.lua at line 283
elseif lines.current.pending.mode == 'arc' thenlocal mx,my = coord(x-16), coord(y-lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < lines.current.h thenlocal center = lines.current.points[lines.current.pending.center]lines.current.pending.end_angle = angle_with_hint(center.x,center.y, mx,my, lines.current.pending.end_angle)table.insert(lines.current.shapes, lines.current.pending)elseif Lines.current.pending.mode == 'arc' thenlocal mx,my = coord(x-16), coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thenlocal center = Lines.current.points[Lines.current.pending.center]Lines.current.pending.end_angle = angle_with_hint(center.x,center.y, mx,my, Lines.current.pending.end_angle)table.insert(Lines.current.shapes, Lines.current.pending) - replacement in main.lua at line 291
lines.current.pending = {}lines.current = nilLines.current.pending = {}Lines.current = nil - replacement in main.lua at line 296
save_to_disk(lines, filename)save_to_disk(Lines, filename) - replacement in main.lua at line 509
if lines[cursor_line].mode == 'drawing' then return endif Lines[cursor_line].mode == 'drawing' then return end - replacement in main.lua at line 512
byteoffset = utf8.offset(lines[cursor_line].data, cursor_pos-1)byteoffset = utf8.offset(Lines[cursor_line].data, cursor_pos-1) - replacement in main.lua at line 516
lines[cursor_line].data = string.sub(lines[cursor_line].data, 1, byteoffset)..t..string.sub(lines[cursor_line].data, byteoffset+1)Lines[cursor_line].data = string.sub(Lines[cursor_line].data, 1, byteoffset)..t..string.sub(Lines[cursor_line].data, byteoffset+1) - replacement in main.lua at line 519
save_to_disk(lines, filename)save_to_disk(Lines, filename) - replacement in main.lua at line 527
table.insert(lines, cursor_line+1, {mode='text', data=''})table.insert(Lines, cursor_line+1, {mode='text', data=''}) - replacement in main.lua at line 532
local byte_start = utf8.offset(lines[cursor_line].data, cursor_pos-1)local byte_end = utf8.offset(lines[cursor_line].data, cursor_pos)local byte_start = utf8.offset(Lines[cursor_line].data, cursor_pos-1)local byte_end = utf8.offset(Lines[cursor_line].data, cursor_pos) - replacement in main.lua at line 536
lines[cursor_line].data = string.sub(lines[cursor_line].data, 1, byte_start-1)..string.sub(lines[cursor_line].data, byte_end)Lines[cursor_line].data = string.sub(Lines[cursor_line].data, 1, byte_start-1)..string.sub(Lines[cursor_line].data, byte_end) - replacement in main.lua at line 538
lines[cursor_line].data = string.sub(lines[cursor_line].data, 1, byte_start-1)Lines[cursor_line].data = string.sub(Lines[cursor_line].data, 1, byte_start-1) - replacement in main.lua at line 543
if lines[cursor_line-1].mode == 'drawing' thentable.remove(lines, cursor_line-1)if Lines[cursor_line-1].mode == 'drawing' thentable.remove(Lines, cursor_line-1) - replacement in main.lua at line 546
-- join linescursor_pos = utf8.len(lines[cursor_line-1].data)+1lines[cursor_line-1].data = lines[cursor_line-1].data..lines[cursor_line].datatable.remove(lines, cursor_line)-- join Linescursor_pos = utf8.len(Lines[cursor_line-1].data)+1Lines[cursor_line-1].data = Lines[cursor_line-1].data..Lines[cursor_line].datatable.remove(Lines, cursor_line) - replacement in main.lua at line 558
if cursor_pos <= #lines[cursor_line].data thenif cursor_pos <= #Lines[cursor_line].data then - replacement in main.lua at line 564
cursor_pos = #lines[cursor_line].data+1cursor_pos = #Lines[cursor_line].data+1 - replacement in main.lua at line 566
if cursor_pos <= #lines[cursor_line].data thenlocal byte_start = utf8.offset(lines[cursor_line].data, cursor_pos)local byte_end = utf8.offset(lines[cursor_line].data, cursor_pos+1)if cursor_pos <= #Lines[cursor_line].data thenlocal byte_start = utf8.offset(Lines[cursor_line].data, cursor_pos)local byte_end = utf8.offset(Lines[cursor_line].data, cursor_pos+1) - replacement in main.lua at line 571
lines[cursor_line].data = string.sub(lines[cursor_line].data, 1, byte_start-1)..string.sub(lines[cursor_line].data, byte_end)Lines[cursor_line].data = string.sub(Lines[cursor_line].data, 1, byte_start-1)..string.sub(Lines[cursor_line].data, byte_end) - replacement in main.lua at line 573
lines[cursor_line].data = string.sub(lines[cursor_line].data, 1, byte_start-1)Lines[cursor_line].data = string.sub(Lines[cursor_line].data, 1, byte_start-1) - replacement in main.lua at line 580
assert(lines[cursor_line].mode == 'text')assert(Lines[cursor_line].mode == 'text') - replacement in main.lua at line 584
if lines[new_cursor_line].mode == 'text' thenlocal old_x = cursor_x(lines[new_cursor_line].data, cursor_pos)if Lines[new_cursor_line].mode == 'text' thenlocal old_x = cursor_x(Lines[new_cursor_line].data, cursor_pos) - replacement in main.lua at line 587
cursor_pos = nearest_cursor_pos(lines[cursor_line].data, old_x, cursor_pos)cursor_pos = nearest_cursor_pos(Lines[cursor_line].data, old_x, cursor_pos) - replacement in main.lua at line 592
assert(lines[cursor_line].mode == 'text')assert(Lines[cursor_line].mode == 'text') - replacement in main.lua at line 594
while new_cursor_line < #lines dowhile new_cursor_line < #Lines do - replacement in main.lua at line 596
if lines[new_cursor_line].mode == 'text' thenlocal old_x = cursor_x(lines[new_cursor_line].data, cursor_pos)if Lines[new_cursor_line].mode == 'text' thenlocal old_x = cursor_x(Lines[new_cursor_line].data, cursor_pos) - replacement in main.lua at line 599
cursor_pos = nearest_cursor_pos(lines[cursor_line].data, old_x, cursor_pos)cursor_pos = nearest_cursor_pos(Lines[cursor_line].data, old_x, cursor_pos) - replacement in main.lua at line 709
lines.current = drawingLines.current = drawing - replacement in main.lua at line 717
lines.current = drawingLines.current = drawing - replacement in main.lua at line 748
for _,line in ipairs(lines) dofor _,line in ipairs(Lines) do - replacement in main.lua at line 798
for _,drawing in ipairs(lines) dofor _,drawing in ipairs(Lines) do - replacement in main.lua at line 809
for _,drawing in ipairs(lines) dofor _,drawing in ipairs(Lines) do - replacement in main.lua at line 826
for _,drawing in ipairs(lines) dofor _,drawing in ipairs(Lines) do - replacement in main.lua at line 843
for _,drawing in ipairs(lines) dofor _,drawing in ipairs(Lines) do