no more Text allocations
[?]
Apr 1, 2023, 11:38 PM
H4R5BHVYKFKF2JOFITQ45VEVW32BOWIMHWFOQ35KAUS6QUI7G5QQCDependencies
- [2]
XUGDTYW2stop confusingly reading a global - [3]
OYVFFWBKmove - [4]
LWPRYDLWset color for each fragment - [5]
UN7GKYV5support hyperlinks in the source editor - [6]
537TQ2QNsome more logging - [7]
2CK5QI7Wmake love event names consistent - [8]
AYE2VEGJextract a couple of methods - [9]
6WDBV52Zmove a var closer to its use - [10]
JRGTJ2IWquite the frustrating bugfix - [11]
LDFXFRUObring a few things in sync between run and source - [12]
HOSPP2ANcrisp font rendering - [13]
IMEJA43Lsnapshot - [14]
FZBXBUFFbugfix: search - [15]
M6TH7VSZrip out notion of Line_width - [16]
CNCYMM6Amake test initializations a little more obvious - [17]
KKMFQDR4editing source code from within the app - [18]
2L4DL7PGgo through App in a couple more places - [19]
TXHMMX25move caching behavior inside compute_fragments - [20]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [21]
3QWK3GSAsupport mouse clicks in file navigator - [22]
A2NV3WVOscrolling with up arrow - [23]
KMSL74GAsupport selections in the source editor - [24]
2L5MEZV3experiment: new edit namespace - [25]
CVGE3SIGI feel confident now that page-down is working. - [26]
WLHI7KD3new globals: draw partial screen line up top - [27]
JY4VK7L2rename - [28]
JLU2RMC4allow Text.nearest_pos_less_than to return 0 - [29]
JMUD7T3Oget rid of ugly side-effects in tests - [30]
PX7DDEMOautosave slightly less aggressively - [31]
UPCIYZEUdrop an unnecessary level of indent - [32]
OI4FPFINsupport drawings in the source editor - [33]
HKV72RZVbugfix: save modified files in save directory - [34]
ILOA5BYFseparate data structure for each line's cache data - [35]
PFT5Y2ZYmove - [36]
QYIFOHW3first test! - [37]
G54H3YG2get rid of all bifold text - [38]
KURLAXXIclean up some prints - [39]
2ZRC7FUL. - [40]
ISOFHXB2App.width can no longer take a Text - [41]
DHI6IJCNselecting text and deleting selections - [42]
HGC5RGJPswitch to line index in a function - [43]
OYXDYPGSget rid of debug variables - [44]
5L7K4GBDclicking to the right of a wrapped line - [45]
HALS7E5Umore clearly skip prints before screen top - [46]
AVTNUQYRbasic test-enabled framework - [47]
ZDAJXYIXremove some unnecessary work - [48]
4KC7I3E2make colors easier to edit - [49]
LAW2O3NWextract variable Margin_left - [50]
5DOC2CBMextract a function - [51]
X3F7ECSLadd state arg to some functions - [52]
R3KXFRZNget rid of to_text - [53]
Z4XRNDTRfind text - [54]
NDHQN23Gdone passing left/right margins everywhere - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
3QNOKBFMbeginnings of a test harness
Change contents
- replacement in text.lua at line 18[4.29]→[6.1941:1984](∅→∅),[6.3906]→[6.1941:1984](∅→∅),[6.1941]→[6.1941:1984](∅→∅),[6.46]→[6.1:37](∅→∅),[6.62]→[6.1:37](∅→∅),[6.37]→[6.3:73](∅→∅)
local frag, frag_text = f.data, f.textlocal frag_len = utf8.len(frag)--? print('text.draw:', frag, 'at', line_index,pos, 'after', x,y)local frag_len = utf8.len(f.data)--? print('text.draw:', f.data, 'at', line_index,pos, 'after', x,y) - replacement in text.lua at line 22
--? print('skipping', frag)--? print('skipping', f.data) - replacement in text.lua at line 39
App.screen.draw(frag_text, x,y)App.screen.print(f.data, x,y) - replacement in text.lua at line 50
Text.draw_cursor(State, x+Text.x(frag, State.cursor1.pos-pos+1), y)Text.draw_cursor(State, x+Text.x(f.data, State.cursor1.pos-pos+1), y) - edit in text.lua at line 90
local frag, frag_text = f.data, f.text - replacement in text.lua at line 97
local frag_len = utf8.len(frag)pos = pos + frag_lenpos = pos + utf8.len(f.data) - edit in text.lua at line 113
local frag_text = App.newText(love.graphics.getFont(), frag) - edit in text.lua at line 127
local frag1_text = App.newText(love.graphics.getFont(), frag1) - replacement in text.lua at line 130
table.insert(line_cache.fragments, {data=frag1, text=frag1_text})table.insert(line_cache.fragments, {data=frag1}) - edit in text.lua at line 132
frag_text = App.newText(love.graphics.getFont(), frag) - replacement in text.lua at line 138
table.insert(line_cache.fragments, {data=frag, text=frag_text})table.insert(line_cache.fragments, {data=frag}) - replacement in source_text.lua at line 20
local frag, frag_text = f.data, f.textselect_color(frag)local frag_len = utf8.len(frag)--? print('text.draw:', frag, 'at', line_index,pos, 'after', x,y)select_color(f.data)local frag_len = utf8.len(f.data)--? print('text.draw:', f.data, 'at', line_index,pos, 'after', x,y) - replacement in source_text.lua at line 25
--? print('skipping', frag)--? print('skipping', f.data) - replacement in source_text.lua at line 43
local trimmed_word = rtrim(frag) -- compute_fragments puts whitespace at the endlocal trimmed_word = rtrim(f.data) -- compute_fragments puts whitespace at the end - replacement in source_text.lua at line 55
App.screen.draw(frag_text, x,y)App.screen.print(f.data, x,y) - replacement in source_text.lua at line 66
Text.draw_cursor(State, x+Text.x(frag, State.cursor1.pos-pos+1), y)Text.draw_cursor(State, x+Text.x(f.data, State.cursor1.pos-pos+1), y) - edit in source_text.lua at line 106
local frag, frag_text = f.data, f.text - replacement in source_text.lua at line 113
local frag_len = utf8.len(frag)pos = pos + frag_lenpos = pos + utf8.len(f.data) - edit in source_text.lua at line 129
local frag_text = App.newText(love.graphics.getFont(), frag) - edit in source_text.lua at line 143
local frag1_text = App.newText(love.graphics.getFont(), frag1) - replacement in source_text.lua at line 146
table.insert(line_cache.fragments, {data=frag1, text=frag1_text})table.insert(line_cache.fragments, {data=frag1}) - edit in source_text.lua at line 148
frag_text = App.newText(love.graphics.getFont(), frag) - replacement in source_text.lua at line 154
table.insert(line_cache.fragments, {data=frag, text=frag_text})table.insert(line_cache.fragments, {data=frag}) - edit in source_edit.lua at line 91
em = App.newText(love.graphics.getFont(), 'm'), -- widest possible character width - edit in edit.lua at line 90
em = App.newText(love.graphics.getFont(), 'm'), -- widest possible character width - edit in app.lua at line 213
-- LÖVE's Text primitive retains no trace of the string it was created from,-- so we'll wrap it for our tests.---- This implies that we need to hook any operations we need on Text objects.function App.newText(font, s)return {type='text', data=s, text=love.graphics.newText(font, s)}end - edit in app.lua at line 418
App.newText = love.graphics.newText