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]
JRGTJ2IWquite the frustrating bugfix - [7]
A2NV3WVOscrolling with up arrow - [8]
Z4XRNDTRfind text - [9]
M6TH7VSZrip out notion of Line_width - [10]
AVTNUQYRbasic test-enabled framework - [11]
2L5MEZV3experiment: new edit namespace - [12]
HALS7E5Umore clearly skip prints before screen top - [13]
KURLAXXIclean up some prints - [14]
QYIFOHW3first test! - [15]
HKV72RZVbugfix: save modified files in save directory - [16]
HGC5RGJPswitch to line index in a function - [17]
AYE2VEGJextract a couple of methods - [18]
KMSL74GAsupport selections in the source editor - [19]
DHI6IJCNselecting text and deleting selections - [20]
5L7K4GBDclicking to the right of a wrapped line - [21]
OYXDYPGSget rid of debug variables - [22]
5DOC2CBMextract a function - [23]
LDFXFRUObring a few things in sync between run and source - [24]
IMEJA43Lsnapshot - [25]
PX7DDEMOautosave slightly less aggressively - [26]
R3KXFRZNget rid of to_text - [27]
6WDBV52Zmove a var closer to its use - [28]
3QWK3GSAsupport mouse clicks in file navigator - [29]
ZDAJXYIXremove some unnecessary work - [30]
UPCIYZEUdrop an unnecessary level of indent - [31]
CVGE3SIGI feel confident now that page-down is working. - [32]
OI4FPFINsupport drawings in the source editor - [33]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [34]
JLU2RMC4allow Text.nearest_pos_less_than to return 0 - [35]
JMUD7T3Oget rid of ugly side-effects in tests - [36]
537TQ2QNsome more logging - [37]
X3F7ECSLadd state arg to some functions - [38]
CNCYMM6Amake test initializations a little more obvious - [39]
KKMFQDR4editing source code from within the app - [40]
LAW2O3NWextract variable Margin_left - [41]
PFT5Y2ZYmove - [42]
ISOFHXB2App.width can no longer take a Text - [43]
G54H3YG2get rid of all bifold text - [44]
JY4VK7L2rename - [45]
4KC7I3E2make colors easier to edit - [46]
WLHI7KD3new globals: draw partial screen line up top - [47]
2L4DL7PGgo through App in a couple more places - [48]
2CK5QI7Wmake love event names consistent - [49]
TXHMMX25move caching behavior inside compute_fragments - [50]
2ZRC7FUL. - [51]
NDHQN23Gdone passing left/right margins everywhere - [52]
HOSPP2ANcrisp font rendering - [53]
ILOA5BYFseparate data structure for each line's cache data - [54]
FZBXBUFFbugfix: search - [*]
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