move caching behavior inside compute_fragments
[?]
Aug 17, 2022, 11:15 PM
TXHMMX25XTR5BQLKHQXIT5TZBFW2KZ54XY3CCL36ZJYJWPKGKC6QCDependencies
- [2]
OYVFFWBKmove - [3]
ZDAJXYIXremove some unnecessary work - [4]
5DOC2CBMextract a function - [5]
ILOA5BYFseparate data structure for each line's cache data - [6]
XUGDTYW2stop confusingly reading a global - [7]
X3F7ECSLadd state arg to some functions - [8]
HVJKBW5Udrop some unnecessary calls - [9]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
HGC5RGJPswitch to line index in a function - [*]
TGHAJBESuse line cache for drawings as well
Change contents
- replacement in text.lua at line 21
if line_cache.fragments == nil thenText.compute_fragments(State, line_index)endText.compute_fragments(State, line_index) - replacement in text.lua at line 91
if line_cache.fragments == nil thenText.compute_fragments(State, line_index)endText.compute_fragments(State, line_index) - edit in text.lua at line 112[12.186][13.54]
if line.mode ~= 'text' then return end - edit in text.lua at line 114[13.104][4.3962]
if line_cache.fragments thenreturnend