stop creating a singleton table for every word
[?]
Apr 1, 2023, 11:43 PM
S2QMLRXLULVA6M73YVC5VQJ2SYUBHG2DTGXEMOBKEPR4OU7ZKG3ACDependencies
- [2]
ISOFHXB2App.width can no longer take a Text - [3]
H4R5BHVYno more Text allocations - [4]
OYVFFWBKmove - [5]
XUGDTYW2stop confusingly reading a global - [6]
FBVUNLS4clean up some debug prints - [7]
6WDBV52Zmove a var closer to its use - [8]
X3F7ECSLadd state arg to some functions - [9]
ILOA5BYFseparate data structure for each line's cache data - [10]
S2MISTTMadd state arg to a few functions - [11]
PFT5Y2ZYmove - [12]
OYXDYPGSget rid of debug variables - [13]
UN7GKYV5support hyperlinks in the source editor - [14]
HIKLULFQextract a function - [15]
KURLAXXIclean up some prints - [16]
UPCIYZEUdrop an unnecessary level of indent - [17]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [18]
DHI6IJCNselecting text and deleting selections - [19]
HALS7E5Umore clearly skip prints before screen top - [20]
R3KXFRZNget rid of to_text - [21]
LWPRYDLWset color for each fragment - [22]
WLHI7KD3new globals: draw partial screen line up top - [23]
G54H3YG2get rid of all bifold text - [24]
KKMFQDR4editing source code from within the app - [25]
Z4XRNDTRfind text - [26]
FZBXBUFFbugfix: search - [27]
CVGE3SIGI feel confident now that page-down is working. - [*]
BULPIBEGbeginnings of a module for the text editor
Change contents
- replacement in text.lua at line 18
local frag_len = utf8.len(f.data)--? print('text.draw:', f.data, 'at', line_index,pos, 'after', x,y)local frag_len = utf8.len(f)--? print('text.draw:', f, 'at', line_index,pos, 'after', x,y) - replacement in text.lua at line 22
--? print('skipping', f.data)--? print('skipping', f) - replacement in text.lua at line 25
local frag_width = App.width(f.data)local frag_width = App.width(f) - replacement in text.lua at line 39
App.screen.print(f.data, x,y)App.screen.print(f, x,y) - replacement in text.lua at line 50
Text.draw_cursor(State, x+Text.x(f.data, State.cursor1.pos-pos+1), y)Text.draw_cursor(State, x+Text.x(f, State.cursor1.pos-pos+1), y) - replacement in text.lua at line 91
local frag_width = App.width(f.data)local frag_width = App.width(f) - replacement in text.lua at line 97
pos = pos + utf8.len(f.data)pos = pos + utf8.len(f) - replacement in text.lua at line 123
table.insert(line_cache.fragments, {data=frag1})table.insert(line_cache.fragments, frag1) - replacement in text.lua at line 130
table.insert(line_cache.fragments, {data=frag})table.insert(line_cache.fragments, frag) - replacement in source_text.lua at line 20
select_color(f.data)local frag_len = utf8.len(f.data)--? print('text.draw:', f.data, 'at', line_index,pos, 'after', x,y)select_color(f)local frag_len = utf8.len(f)--? print('text.draw:', f, 'at', line_index,pos, 'after', x,y) - replacement in source_text.lua at line 25
--? print('skipping', f.data)--? print('skipping', f) - replacement in source_text.lua at line 28
local frag_width = App.width(f.data)local frag_width = App.width(f) - replacement in source_text.lua at line 43
local trimmed_word = rtrim(f.data) -- compute_fragments puts whitespace at the endlocal trimmed_word = rtrim(f) -- compute_fragments puts whitespace at the end - replacement in source_text.lua at line 55
App.screen.print(f.data, x,y)App.screen.print(f, x,y) - replacement in source_text.lua at line 66
Text.draw_cursor(State, x+Text.x(f.data, State.cursor1.pos-pos+1), y)Text.draw_cursor(State, x+Text.x(f, State.cursor1.pos-pos+1), y) - replacement in source_text.lua at line 107
local frag_width = App.width(f.data)local frag_width = App.width(f) - replacement in source_text.lua at line 113
pos = pos + utf8.len(f.data)pos = pos + utf8.len(f) - replacement in source_text.lua at line 139
table.insert(line_cache.fragments, {data=frag1})table.insert(line_cache.fragments, frag1) - replacement in source_text.lua at line 146
table.insert(line_cache.fragments, {data=frag})table.insert(line_cache.fragments, frag)