group all editor globals
[?]
Jul 12, 2022, 9:18 PM
LF7BWEG4DKQI7NMXMZC4LC2BE5PB42HK5PD6OYBNIDMAZBJASOKQCDependencies
- [2]
CLRJI4QKbugfix: backspace from start of file - [3]
VO3GEIRWuse app name in window title - [4]
GSPXUEQO. - [5]
NVSWVPW5move - [6]
KICO5EE5typos - [7]
VA2ZYFFFbetter fix for commit 3ffc2ed8f - [8]
7LVK4KRDfix a failing test - [9]
5UG5PQ6Kundo commit 861c57b533 - [10]
YT5P6TO6bugfix: save previous file when dropping a new one on - [11]
5MR22SGZbugfix: enable resize when loading settings - [12]
G5HANZBIbugfix - [13]
2LOQ5ALJadd args to some functions - [14]
T57DTBX6add args to some functions - [15]
5OALPNN3add args to some functions - [16]
UV4EWOLYadd args to some functions - [17]
4KC7I3E2make colors easier to edit - [18]
2JLVAYHBstart decoupling editor tests from App - [19]
3QQZ7W4Ebring couple more globals back to the app level - [20]
WTDKUACNrectangle and square shapes - [21]
42LVB4DEtest: naming a point - [22]
CAMMFOJ4make cursor more obvious - [23]
AH744RFRshow when we're naming a point - [24]
BPWFKBXTnew test: dragging and dropping a file on lines.love - [25]
JY4VK7L2rename - [26]
4VKEE43Zbugfix - [27]
YLKLDF4R. - [28]
BJ2C6F2Bignore 'name' mode in a few places - [29]
NQWWTGXRswitch undo/redo to ctrl- hotkeys - [30]
KAUD3YIKtests: deleting points/shapes - [31]
VIU2FBNVmake sure to save right when quitting - [32]
EWMPYCDObugfix - [33]
5DOC2CBMextract a function - [34]
YJJ4X4JGbugfix: avoid scrolling on 'end' - [35]
3TFEAQSWstart using some globals - [36]
VHQCNMARseveral more modules - [37]
AJB4LFRBtry to maintain a reasonable line width - [38]
OGUV4HSAremove some memory leaks from rendered fragments - [39]
6UZ2JNZEyet another key conflict - [40]
YTSPVDZHfirst successful pagedown test, first bug found by test - [41]
AOIRVVJArevert selection logic to before commit 3ffc2ed8f - [42]
65HNIAOSmake freehand drawings smoother - [43]
AJP4OSTJnew test - [44]
PYGMASTVdisable some debug prints - [45]
PR4KIAZDfirst stab at equally hacky cursor down support - [46]
PFT5Y2ZYmove - [47]
Z4XRNDTRfind text - [48]
PWHZPJJMalways show current filename in window title - [49]
NHA7RUFImove current mode indicator slightly - [50]
BULPIBEGbeginnings of a module for the text editor - [51]
AVFRVNFRbetter handle moving points - [52]
S2YQBEYCsnapshot: test for a new regression - [53]
DSLD74DKlots more tests - [54]
YCDYGEZUinclude drawing index in a few places - [55]
4J2L6JMRbugfix: deleting a selection spanning pages - [56]
7DPPMI2Uanother integer coordinate - [57]
FFBIY74Nbugfix: 'escape' to cancel a stroke - [58]
7M7LS7I2start saving some settings to disk on quit - [59]
CE4LZV4Tdrop last couple of manual tests - [60]
RT6EV6OPdelegate update events to drawings - [61]
CBPV5SSIstop handling nil screen_line_starting_pos everywhere - [62]
RMKMPFT5fix a corner case when selecting text - [63]
ULKLJBN6couple of renames - [64]
YIQYNVD2rip out the line-width slider - [65]
A2NV3WVOscrolling with up arrow - [66]
BLWAYPKVextract a module - [67]
O6T3TPXDbugfix: position cursor up top when loading file - [68]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [69]
HTWAM4NZbugfix: scrolling in left/right movements - [70]
65XHTZEKregression: couldn't do many drawing operations because line.y was reset - [71]
VVXVV2D2change data model; text can now have metadata - [72]
B3IWYWSRdelete another arg that can be deduced - [73]
3GFQP6IRstop saving the entire file when modifying drawings - [74]
QKAMUWSBanother bugfix in scrolling while inserting text - [75]
KZ5GAYRPthis fixes the immediate regression - [76]
CCYSVZA2bugfix: BSOD in #4. - [77]
WY3JD6W6bugfix - [78]
DAENUOGVeliminate assumptions that line length == size in bytes - [79]
SQLVYKVJrename - [80]
Y2ZIPXEMnew test - [81]
2RXZ3PGObeginning of a new approach to scroll+wrap - [82]
EBBFOW4Xbugfix: clear selection in a couple more places - [83]
7CLGG7J2test: autosave after any shape - [84]
S7ZZA3YEugh, handle absolute as well as relative paths - [85]
7Q6GKOOL. - [86]
GN3IF4WFbugfix: pasting newlines - [87]
2ZYV7D3Whandle tab characters - [88]
7EQLPB3Obugfix: don't delete selection when moving cursor - [89]
2CH77LZCadd args to some functions - [90]
2MA33THZfew more transitions between shapes - [91]
NQKFQSZEundo creating new drawings - [92]
CVGE3SIGI feel confident now that page-down is working. - [93]
NUCZBE77bugfix: alignment of help screen - [94]
GJLOKCYKbugfix: clicking past end of screen line - [95]
UYRAO73Yenable pressing and holding backspace - [96]
2LC3BM2Nsupport other whitespace chars in word movements - [97]
XSLCFVFH. - [98]
LYN3L74Wcorrect commit f3abc2cbf2 - [99]
QYIFOHW3first test! - [100]
K464QQR4more defensive resize handling - [101]
U7M4M2F7bugfix: don't rely on Screen_bottom1 while scrolling - [102]
TRNWIQN6more precise height calculation when scrolling up as much as possible while keeping cursor on screen - [103]
V3EABA35skip multiple consecutive whitespace - [104]
BTKAW76Lrename - [105]
4AXV2HG4all pending manual tests done! - [106]
W4UVZETR2 regressions: - [107]
HOSPP2ANcrisp font rendering - [108]
AMSESRTHmove some code - [109]
F3OOGMMEswitch freehand hotkey to eliminate conflict with search - [110]
WSXSEZQ2switch circles to 'o' to avoid conflicting with copy - [111]
CPZGQT72go through and fix similar issues - [112]
X75QPYVWmove Selection1 clearing past business logic - [113]
SVJZZDC3snapshot - no, that's all wrong - [114]
73OCE2MCafter much struggle, a brute-force undo - [115]
YGCT2D2Ostart loading settings as applicable - [116]
LXTTOB33extract a couple of files - [117]
4QQBMWLLregression: typing uppercase letters in text - [118]
L6XA5EY2test: moving a point - [119]
WLHI7KD3new globals: draw partial screen line up top - [120]
KOYAJWE4extract a couple more methods - [121]
GGJEDJOOadd args to some functions - [122]
4KOI3E6Rremove some redundant checks - [123]
VJ77YABHmore efficient undo/redo - [124]
GSV7DABCmake online help fit within a drawing - [125]
FHSZYAZ2more precise search highlighting - [126]
6DE7RBZ6move mouse_released events to Drawing - [127]
BYG5CEMVsupport for naming points - [128]
ESETRNLBbugfix: printing the first part of a line at the bottom made it seem non-wrapping - [129]
HIKLULFQextract a function - [130]
5DOTWNVMright margin - [131]
PHFWIFYKscroll on enter - [132]
QCQTMUZ7add args to some functions - [133]
DHI6IJCNselecting text and deleting selections - [134]
C45WCXJ2keep drawings within the line width slider as well - [135]
O7QH4N4Wspeeding up copy, attempt 1 - [136]
SLLR6KKIbugfix for non-ASCII - [137]
M6TH7VSZrip out notion of Line_width - [138]
CVSRHMJ2experiment: slightly adaptive scrolling - [139]
Z4KNS42Nto open a file without a terminal, drag it on! - [140]
NYQ7HD4Dmove - [141]
SRVDX4I5local var - [142]
DRFE3B3Zmouse buttons are integers, not strings - [143]
WAR3HXHTtest both ways of selecting text with mouse - [144]
AD34IX2Zcouple more tests - [145]
GK47BBCYstart passing left/right margins everywhere - [146]
UZVWYRTYmissing temporary modes in a couple more places - [147]
LERERVPHkeep one screen line of overlap on pagedown - [148]
GCEF4N3Vstop repeatedly checking for line wrapping - [149]
PLKNHYZ4extract a function - [150]
2POFQQLWkeep cursor on screen when pressing 'down' - [151]
AM42E4Y6avoid redundant writes on exit - [152]
H22OAXWEcouple of TODOs - [153]
QGO66DNKinitialize screen width to something reasonable - [154]
3TCZ7ADHmove - [155]
BU3LUPY3bugfix in help - [156]
2TQR4PSYadd args to some functions - [157]
7DYUAOI6test: undo moving point - [158]
6LIPEQ5Imore robust transitions to temporary modes - [159]
YJGADSGKdelete unused arg - [160]
FT3ZSQBCanswered an open question - [161]
T7SJSJIHtest: undo naming a point - [162]
OIB2QPRCstart remembering where the cursor is drawn in px - [163]
IWYLK45Kclicking to the right of a line within line width - [164]
HFI2YR2Crip out geometry commandline arg - [165]
K2X6G75Zstart writing some tests for drawings - [166]
ZHLO7K3Madd args to some functions - [167]
62PZGSUCoptimization: moving cursor to next word - [168]
WPW3AVFSmore precise shape selection - [169]
MYC7XR5Qbugfix: lines that aren't drawn from the start - [170]
QLTJG7Q3indent - [171]
NZKYPBSKcheck for scroll when just typing - [172]
AIRIP35Zcleaner - [173]
WQOSZSUEwarn on unused commandline args - [174]
AQQQNDTLyet another bugfix in selection management - [175]
T3B4NLV3include a unit test - [176]
KECEMMMRextract couple of functions - [177]
R53OF3ONone bug I've repeatedly run into while testing with Moby Dick - [178]
FYS7TCDWbugfix - [179]
K4OBZSHEadd args to some functions - [180]
537TQ2QNsome more logging - [181]
Y36LOGR5bugfix: show cursor when past end of line - [182]
EMHRPJ3Rno, that's not right - [183]
JRGTJ2IWquite the frustrating bugfix - [184]
LAW2O3NWextract variable Margin_left - [185]
AVTNUQYRbasic test-enabled framework - [186]
5T2E3PDVcouple of bugfixes to file-handling - [187]
CG3264MMmove - [188]
HMODUNJEscroll on backspace - [189]
5L7K4GBDclicking to the right of a wrapped line - [190]
DWZK32YDinclude CWD when saving filename - [191]
XDB5D7H7some early returns should be asserts - [192]
MGOQ5XAVstart uppercasing globals - [193]
AVQ5MC5Dfinish uppercasing all globals - [194]
R6GUSTBYdefault font size and line-height - [195]
VG75U7IMbugfix: typing should delete highlighted text - [196]
KMRJOSLYbugfix: delete selection before pasting - [197]
UFIUYYYVadditional logging for an active bug - [198]
DXT4QTAHa few more integer coordinates - [199]
EMRPLZPWdrop an arg from a function - [200]
ZLJGZYQGselect text with shift + mouseclick - [201]
H3ECRBXFbugfix: clicking on empty lines - [202]
WIPDCP4Ustop recording points for arcs - [203]
BOFNXP5Gclicking now moves the cursor even on long, wrapped lines - [204]
LS55YKGWswitch copy/paste to ctrl- hotkeys - [205]
253TWKDAclean up - [206]
OMTGHWMAyet another bugfix. But for how long? - [207]
2H67P75Xswitch arg for a function - [208]
C6QTJYA4keep online help inside of drawing - [209]
WOXIYUTLbugfix: manage screen_top and cursor when resizing - [210]
LUNH47XXmake text and drawings the same width - [211]
OWK3U6VDtests for drawing polygons - [212]
HYEAFRZ2split mouse_pressed events between Text and Drawing - [213]
7SFHSB47rename - [214]
CUIV2LE5some typos - [215]
RF5ALVNYallow the window to be resized - [216]
JJ7J4PUBsome unnecessary mutations - [217]
CTJ3IZGSadd args to some functions - [218]
3RGHOJ25DRY some code - [219]
7NQCCB34. - [220]
XRLJDW3Wcasting about for more helpers to extract.. - [221]
3OKKTUT4up and down arrow now moving by screen line where possible - [222]
PX7DDEMOautosave slightly less aggressively - [223]
XI5OALQXsome redundant calls - [224]
AYE2VEGJextract a couple of methods - [225]
6VQIWTQUstandardize on ordering of cases - [226]
E6TMJY2Tlighter color for in-progress strokes - [227]
V5MJRFOZbugfix: down arrow doesn't scroll up unnecessarily - [228]
AVLAYODPmuch simpler - [229]
2ZRC7FUL. - [230]
PVEZKGACbugfix: recompute screen lines in backspace/delete - [231]
JFFUF5ALoverride mouse state lookups in tests - [232]
MP2TBKU6bugfix: crash in Text.up() after return - [233]
2KRK3OBVdon't rely on defaults - [234]
OYXDYPGSget rid of debug variables - [235]
MDXGMZU2disable all debug prints - [236]
P66MRF3Ubugfix: don't append metadata when it already exists - [237]
4CXVIEBSadd args to some functions - [238]
VVAGDVCUexperiment: line cursor - [239]
3TDOZESEextract scrolling logic out of insert_return - [240]
2L5MEZV3experiment: new edit namespace - [241]
YPHKZVWMextract a new variable - [242]
BERHYBXMfix help for rectangles and squares - [243]
242L3OQXbugfix: ensure Cursor_line is always on a text line - [244]
CRYGI3LRmore drawing tests - [245]
NUZFHX6Iflesh out some tests for word movements - [246]
ED2FYWDKturns out super- chords to get to textinput - [247]
DGK5BPVIbugfix: UTF-8 in compute_fragments - [248]
ZPUQSPQPextract a few methods - [249]
KOTI3MFGbugfix in previous commit - [250]
QVDQMJXVavoid scrolling down if possible - [251]
JAXPXLEBset current_drawing_index with current_drawing - [252]
6LJZN727handle chords - [253]
NQH7DEEWbugfix: missed rename in one file - [254]
G6OYAYHUpaste in text with M-v - [255]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [256]
2L4DL7PGgo through App in a couple more places - [257]
Y4VYNEGFtest: autosave after name/move/delete of point - [258]
IRCKL6VNextract scrolling logic out of insert_at_cursor - [259]
EGH7XDBKsupport non-text lines in Text.to2 - [260]
4WAFGF4Zselection bugfix - [261]
UH4YWHW5button framework is at the app level - [262]
EHX6Q4OJmake the cursor a little thicker - [263]
DLQMM265scroll past first page - [264]
ZZ2B5RPQextract variables for drawing padding - [265]
R22PA3XRfix a second BSOD in #4 :/ - [266]
PIEDOKYQbugfix - [267]
J2SVGR2Eexperiment: blinking cursor - [268]
F63Q4OV7several bugfixes - [269]
OP643FFGmove - [270]
OTIBCAUJlove2d scaffold - [271]
XNFTJHC4split keyboard handling between Text and Drawing - [272]
YW5324Q3bugfix: cut (C-x) without first selecting anything - [273]
CIQN2MDEbugfix: typing a capital letter deletes selection
Change contents
- replacement in undo.lua at line 10
History[Next_history] = dataNext_history = Next_history+1for i=Next_history,#History doHistory[i] = nilEditor_state.history[Editor_state.next_history] = dataEditor_state.next_history = Editor_state.next_history+1for i=Editor_state.next_history,#Editor_state.history doEditor_state.history[i] = nil - replacement in undo.lua at line 18
if Next_history > 1 then--? print('moving to history', Next_history-1)Next_history = Next_history-1local result = History[Next_history]if Editor_state.next_history > 1 then--? print('moving to history', Editor_state.next_history-1)Editor_state.next_history = Editor_state.next_history-1local result = Editor_state.history[Editor_state.next_history] - replacement in undo.lua at line 27
if Next_history <= #History then--? print('restoring history', Next_history+1)local result = History[Next_history]Next_history = Next_history+1if Editor_state.next_history <= #Editor_state.history then--? print('restoring history', Editor_state.next_history+1)local result = Editor_state.history[Editor_state.next_history]Editor_state.next_history = Editor_state.next_history+1 - replacement in undo.lua at line 43
assert(#Lines > 0)assert(#Editor_state.lines > 0) - replacement in undo.lua at line 45
if s > #Lines then s = #Lines endif s > #Editor_state.lines then s = #Editor_state.lines end - replacement in undo.lua at line 47
if e > #Lines then e = #Lines endif e > #Editor_state.lines then e = #Editor_state.lines end - replacement in undo.lua at line 50
screen_top=deepcopy(Screen_top1),selection=deepcopy(Selection1),cursor=deepcopy(Cursor1),screen_top=deepcopy(Editor_state.screen_top1),selection=deepcopy(Editor_state.selection1),cursor=deepcopy(Editor_state.cursor1), - replacement in undo.lua at line 54
previous_drawing_mode=Previous_drawing_mode,previous_drawing_mode=Editor_state.previous_drawing_mode, - replacement in undo.lua at line 62
local line = Lines[i]local line = Editor_state.lines[i] - replacement in text_tests.lua at line 6
Lines = load_array{}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 9
check_eq(#Lines, 1, 'F - test_initial_state/#lines')check_eq(Cursor1.line, 1, 'F - test_initial_state/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_initial_state/cursor:pos')check_eq(Screen_top1.line, 1, 'F - test_initial_state/screen_top:line')check_eq(Screen_top1.pos, 1, 'F - test_initial_state/screen_top:pos')check_eq(#Editor_state.lines, 1, 'F - test_initial_state/#lines')check_eq(Editor_state.cursor1.line, 1, 'F - test_initial_state/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_initial_state/cursor:pos')check_eq(Editor_state.screen_top1.line, 1, 'F - test_initial_state/screen_top:line')check_eq(Editor_state.screen_top1.pos, 1, 'F - test_initial_state/screen_top:pos') - replacement in text_tests.lua at line 19
Lines = load_array{}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 22
App.run_after_mouse_click(8,Margin_top+8, 1)App.run_after_mouse_click(8,Editor_state.margin_top+8, 1) - replacement in text_tests.lua at line 24
check_eq(#Lines, 2, 'F - test_click_to_create_drawing/#lines')check_eq(Cursor1.line, 2, 'F - test_click_to_create_drawing/cursor')check_eq(#Editor_state.lines, 2, 'F - test_click_to_create_drawing/#lines')check_eq(Editor_state.cursor1.line, 2, 'F - test_click_to_create_drawing/cursor') - replacement in text_tests.lua at line 32
Lines = load_array{'```lines', '```', ''}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 35
Cursor1.line = 2Editor_state.cursor1.line = 2 - replacement in text_tests.lua at line 38
check_eq(#Lines, 1, 'F - test_backspace_to_delete_drawing/#lines')check_eq(Cursor1.line, 1, 'F - test_backspace_to_delete_drawing/cursor')check_eq(#Editor_state.lines, 1, 'F - test_backspace_to_delete_drawing/#lines')check_eq(Editor_state.cursor1.line, 1, 'F - test_backspace_to_delete_drawing/cursor') - replacement in text_tests.lua at line 45
Lines = load_array{}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 49
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 57[20.149]→[20.149:174](∅→∅),[20.174]→[20.194:241](∅→∅),[20.241]→[20.206:288](∅→∅),[20.206]→[20.206:288](∅→∅)
Lines = load_array{''}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{''}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 68
Lines = load_array{'a'}Cursor1 = {line=1, pos=2}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'a'}Editor_state.cursor1 = {line=1, pos=2}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 73
check_eq(Cursor1.pos, 1, 'F - test_move_left')check_eq(Editor_state.cursor1.pos, 1, 'F - test_move_left') - replacement in text_tests.lua at line 79
Lines = load_array{'a'}Cursor1 = {line=1, pos=1}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'a'}Editor_state.cursor1 = {line=1, pos=1}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 84
check_eq(Cursor1.pos, 2, 'F - test_move_right')check_eq(Editor_state.cursor1.pos, 2, 'F - test_move_right') - replacement in text_tests.lua at line 90
Lines = load_array{'abc', 'def'}Cursor1 = {line=2, pos=1}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc', 'def'}Editor_state.cursor1 = {line=2, pos=1}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 95
check_eq(Cursor1.line, 1, 'F - test_move_left_to_previous_line/line')check_eq(Cursor1.pos, 4, 'F - test_move_left_to_previous_line/pos') -- past end of linecheck_eq(Editor_state.cursor1.line, 1, 'F - test_move_left_to_previous_line/line')check_eq(Editor_state.cursor1.pos, 4, 'F - test_move_left_to_previous_line/pos') -- past end of line - replacement in text_tests.lua at line 102
Lines = load_array{'abc', 'def'}Cursor1 = {line=1, pos=4} -- past end of lineMargin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc', 'def'}Editor_state.cursor1 = {line=1, pos=4} -- past end of lineEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 107
check_eq(Cursor1.line, 2, 'F - test_move_right_to_next_line/line')check_eq(Cursor1.pos, 1, 'F - test_move_right_to_next_line/pos')check_eq(Editor_state.cursor1.line, 2, 'F - test_move_right_to_next_line/line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_move_right_to_next_line/pos') - replacement in text_tests.lua at line 114
Lines = load_array{'abc'}Cursor1 = {line=1, pos=3}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc'}Editor_state.cursor1 = {line=1, pos=3}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 119
check_eq(Cursor1.pos, 1, 'F - test_move_to_start_of_word')check_eq(Editor_state.cursor1.pos, 1, 'F - test_move_to_start_of_word') - replacement in text_tests.lua at line 125
Lines = load_array{'abc def'}Cursor1 = {line=1, pos=4} -- at the space between wordsMargin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc def'}Editor_state.cursor1 = {line=1, pos=4} -- at the space between wordsEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 130
check_eq(Cursor1.pos, 1, 'F - test_move_to_start_of_previous_word')check_eq(Editor_state.cursor1.pos, 1, 'F - test_move_to_start_of_previous_word') - replacement in text_tests.lua at line 136
Lines = load_array{'abc def'}Cursor1 = {line=1, pos=5} -- at the start of second wordMargin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc def'}Editor_state.cursor1 = {line=1, pos=5} -- at the start of second wordEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 141
check_eq(Cursor1.pos, 1, 'F - test_skip_to_previous_word')check_eq(Editor_state.cursor1.pos, 1, 'F - test_skip_to_previous_word') - replacement in text_tests.lua at line 147
Lines = load_array{'abc def\tghi'}Cursor1 = {line=1, pos=10} -- within third wordMargin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc def\tghi'}Editor_state.cursor1 = {line=1, pos=10} -- within third wordEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 152
check_eq(Cursor1.pos, 9, 'F - test_skip_past_tab_to_previous_word')check_eq(Editor_state.cursor1.pos, 9, 'F - test_skip_past_tab_to_previous_word') - replacement in text_tests.lua at line 158
Lines = load_array{'abc def'}Cursor1 = {line=1, pos=6} -- at the start of second wordMargin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc def'}Editor_state.cursor1 = {line=1, pos=6} -- at the start of second wordEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 163
check_eq(Cursor1.pos, 1, 'F - test_skip_multiple_spaces_to_previous_word')check_eq(Editor_state.cursor1.pos, 1, 'F - test_skip_multiple_spaces_to_previous_word') - replacement in text_tests.lua at line 169
Lines = load_array{'abc def', 'ghi'}Cursor1 = {line=2, pos=1}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc def', 'ghi'}Editor_state.cursor1 = {line=2, pos=1}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 174
check_eq(Cursor1.line, 1, 'F - test_move_to_start_of_word_on_previous_line/line')check_eq(Cursor1.pos, 5, 'F - test_move_to_start_of_word_on_previous_line/pos')check_eq(Editor_state.cursor1.line, 1, 'F - test_move_to_start_of_word_on_previous_line/line')check_eq(Editor_state.cursor1.pos, 5, 'F - test_move_to_start_of_word_on_previous_line/pos') - replacement in text_tests.lua at line 181
Lines = load_array{'abc def'}Cursor1 = {line=1, pos=1}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc def'}Editor_state.cursor1 = {line=1, pos=1}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 186
check_eq(Cursor1.pos, 4, 'F - test_move_past_end_of_word')check_eq(Editor_state.cursor1.pos, 4, 'F - test_move_past_end_of_word') - replacement in text_tests.lua at line 192
Lines = load_array{'abc def'}Cursor1 = {line=1, pos=4} -- at the space between wordsMargin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc def'}Editor_state.cursor1 = {line=1, pos=4} -- at the space between wordsEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 197
check_eq(Cursor1.pos, 8, 'F - test_skip_to_next_word')check_eq(Editor_state.cursor1.pos, 8, 'F - test_skip_to_next_word') - replacement in text_tests.lua at line 203
Lines = load_array{'abc\tdef'}Cursor1 = {line=1, pos=1} -- at the space between wordsMargin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc\tdef'}Editor_state.cursor1 = {line=1, pos=1} -- at the space between wordsEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 208
check_eq(Cursor1.pos, 4, 'F - test_skip_past_tab_to_next_word')check_eq(Editor_state.cursor1.pos, 4, 'F - test_skip_past_tab_to_next_word') - replacement in text_tests.lua at line 214
Lines = load_array{'abc def'}Cursor1 = {line=1, pos=4} -- at the start of second wordMargin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc def'}Editor_state.cursor1 = {line=1, pos=4} -- at the start of second wordEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 219
check_eq(Cursor1.pos, 9, 'F - test_skip_multiple_spaces_to_next_word')check_eq(Editor_state.cursor1.pos, 9, 'F - test_skip_multiple_spaces_to_next_word') - replacement in text_tests.lua at line 225
Lines = load_array{'abc def', 'ghi'}Cursor1 = {line=1, pos=8}Margin_right = 0; Margin_width = Margin_leftEditor_state.lines = load_array{'abc def', 'ghi'}Editor_state.cursor1 = {line=1, pos=8}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left - replacement in text_tests.lua at line 230
check_eq(Cursor1.line, 2, 'F - test_move_past_end_of_word_on_next_line/line')check_eq(Cursor1.pos, 4, 'F - test_move_past_end_of_word_on_next_line/pos')check_eq(Editor_state.cursor1.line, 2, 'F - test_move_past_end_of_word_on_next_line/line')check_eq(Editor_state.cursor1.pos, 4, 'F - test_move_past_end_of_word_on_next_line/pos') - replacement in text_tests.lua at line 238[20.151]→[20.151:186](∅→∅),[20.186]→[20.242:289](∅→∅),[20.289]→[20.218:300](∅→∅),[20.218]→[20.218:300](∅→∅)
Lines = load_array{'abc', 'def'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 245
App.run_after_mouse_click(Margin_left+8,Margin_top+5, 1)App.run_after_mouse_click(Editor_state.margin_left+8,Editor_state.margin_top+5, 1) - replacement in text_tests.lua at line 247
check_eq(Cursor1.line, 1, 'F - test_click_with_mouse/cursor')check_nil(Selection1.line, 'F - test_click_with_mouse/selection is empty to avoid perturbing future edits')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse/cursor')check_nil(Editor_state.selection1.line, 'F - test_click_with_mouse/selection is empty to avoid perturbing future edits') - replacement in text_tests.lua at line 255
Lines = load_array{'', 'def'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'', 'def'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 262
App.run_after_mouse_click(Margin_left+8,Margin_top+5, 1)App.run_after_mouse_click(Editor_state.margin_left+8,Editor_state.margin_top+5, 1) - replacement in text_tests.lua at line 264
check_eq(Cursor1.line, 1, 'F - test_click_with_mouse_on_empty_line/cursor')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse_on_empty_line/cursor') - replacement in text_tests.lua at line 270[20.190]→[20.190:232](∅→∅),[20.232]→[20.290:337](∅→∅),[20.337]→[20.264:346](∅→∅),[20.264]→[20.264:346](∅→∅)
Lines = load_array{'abc', 'def', 'ghi'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'ghi'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 276
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 278
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 280
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 287[20.725]→[20.725:769](∅→∅),[20.769]→[20.338:385](∅→∅),[20.385]→[20.801:883](∅→∅),[20.801]→[20.801:883](∅→∅)
Lines = load_array{'abc', 'defgh', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'defgh', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 293
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 295
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 297
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 304[20.1298]→[20.1298:1341](∅→∅),[20.1341]→[20.386:433](∅→∅),[20.433]→[20.1373:1455](∅→∅),[20.1373]→[20.1373:1455](∅→∅)
Lines = load_array{'abc def ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc def ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 310
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 312
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 314
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 322[20.1966]→[20.1966:2011](∅→∅),[20.2011]→[20.434:481](∅→∅),[20.481]→[20.2043:2125](∅→∅),[20.2043]→[20.2043:2125](∅→∅)
Lines = load_array{'abcd e fghijk', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abcd e fghijk', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 328
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 330
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 332
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 340[20.206]→[20.206:290](∅→∅),[20.290]→[20.482:529](∅→∅),[20.529]→[20.322:404](∅→∅),[20.322]→[20.322:404](∅→∅)
Lines = load_array{'madam I’m adam', 'xyz'} -- notice the non-ASCII apostropheMargin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'madam I’m adam', 'xyz'} -- notice the non-ASCII apostropheEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 346
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 348
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 350
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 359[20.190]→[20.190:229](∅→∅),[20.229]→[20.530:577](∅→∅),[20.577]→[20.247:329](∅→∅),[20.247]→[20.247:329](∅→∅)
Lines = load_array{"madam I'm adam"}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{"madam I'm adam"}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 365
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 367
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 369
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 373
check_eq(Cursor1.line, 1, 'F - test_click_on_wrapping_line/cursor:line')check_eq(Cursor1.pos, 13, 'F - test_click_on_wrapping_line/cursor:pos')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_on_wrapping_line/cursor:line')check_eq(Editor_state.cursor1.pos, 13, 'F - test_click_on_wrapping_line/cursor:pos') - replacement in text_tests.lua at line 382[20.296]→[20.296:335](∅→∅),[20.335]→[20.578:625](∅→∅),[20.625]→[20.353:435](∅→∅),[20.353]→[20.353:435](∅→∅)
Lines = load_array{"madam I'm adam"}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=8}Screen_top1 = {line=1, pos=7}Screen_bottom1 = {}Editor_state.lines = load_array{"madam I'm adam"}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=8}Editor_state.screen_top1 = {line=1, pos=7}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 388
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 390
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 394
check_eq(Cursor1.line, 1, 'F - test_click_on_wrapping_line_rendered_from_partway_at_top_of_screen/cursor:line')check_eq(Cursor1.pos, 13, 'F - test_click_on_wrapping_line_rendered_from_partway_at_top_of_screen/cursor:pos')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_on_wrapping_line_rendered_from_partway_at_top_of_screen/cursor:line')check_eq(Editor_state.cursor1.pos, 13, 'F - test_click_on_wrapping_line_rendered_from_partway_at_top_of_screen/cursor:pos') - replacement in text_tests.lua at line 403[20.1090]→[20.1090:1129](∅→∅),[20.1129]→[20.626:673](∅→∅),[20.673]→[20.1147:1229](∅→∅),[20.1147]→[20.1147:1229](∅→∅)
Lines = load_array{"madam I'm adam"}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{"madam I'm adam"}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 409
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 411
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 413
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 415
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 419
check_eq(Cursor1.pos, 15, 'F - test_click_past_end_of_wrapping_line/cursor') -- one more than the number of UTF-8 code-pointscheck_eq(Editor_state.cursor1.pos, 15, 'F - test_click_past_end_of_wrapping_line/cursor') -- one more than the number of UTF-8 code-points - replacement in text_tests.lua at line 427[20.253]→[20.253:330](∅→∅),[20.330]→[20.674:721](∅→∅),[20.721]→[20.348:430](∅→∅),[20.348]→[20.348:430](∅→∅)
Lines = load_array{'madam I’m adam'} -- notice the non-ASCII apostropheMargin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'madam I’m adam'} -- notice the non-ASCII apostropheEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 433
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 435
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 437
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 439
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 443
check_eq(Cursor1.pos, 15, 'F - test_click_on_wrapping_line_containing_non_ascii/cursor') -- one more than the number of UTF-8 code-pointscheck_eq(Editor_state.cursor1.pos, 15, 'F - test_click_on_wrapping_line_containing_non_ascii/cursor') -- one more than the number of UTF-8 code-points - replacement in text_tests.lua at line 452[20.335]→[20.335:404](∅→∅),[20.404]→[20.722:769](∅→∅),[20.769]→[20.423:505](∅→∅),[20.423]→[20.423:505](∅→∅)
Lines = load_array{'the quick brown fox jumped over the lazy dog'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'the quick brown fox jumped over the lazy dog'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 458
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 460
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 464
check_eq(Cursor1.pos, 20, 'F - test_click_past_end_of_word_wrapping_line/cursor')check_eq(Editor_state.cursor1.pos, 20, 'F - test_click_past_end_of_word_wrapping_line/cursor') - replacement in text_tests.lua at line 471[20.341]→[20.135:167](∅→∅),[20.135]→[20.135:167](∅→∅),[20.167]→[20.770:817](∅→∅),[20.817]→[20.185:267](∅→∅),[20.185]→[20.185:267](∅→∅)
Lines = load_array{'abc def'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc def'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 483
check_eq(Selection1.line, 1, 'F - test_select_text/selection:line')check_eq(Selection1.pos, 1, 'F - test_select_text/selection:pos')check_eq(Cursor1.line, 1, 'F - test_select_text/cursor:line')check_eq(Cursor1.pos, 2, 'F - test_select_text/cursor:pos')check_eq(Editor_state.selection1.line, 1, 'F - test_select_text/selection:line')check_eq(Editor_state.selection1.pos, 1, 'F - test_select_text/selection:pos')check_eq(Editor_state.cursor1.line, 1, 'F - test_select_text/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_select_text/cursor:pos') - replacement in text_tests.lua at line 493[20.381]→[20.229:257](∅→∅),[20.229]→[20.229:257](∅→∅),[20.257]→[20.818:865](∅→∅),[20.865]→[20.275:388](∅→∅),[20.275]→[20.275:388](∅→∅)
Lines = load_array{'abc'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Selection1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.selection1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 503
check_nil(Selection1.line, 'F - test_cursor_movement_without_shift_resets_selection')check_eq(Lines[1].data, 'abc', 'F - test_cursor_movement_without_shift_resets_selection/data')check_nil(Editor_state.selection1.line, 'F - test_cursor_movement_without_shift_resets_selection')check_eq(Editor_state.lines[1].data, 'abc', 'F - test_cursor_movement_without_shift_resets_selection/data') - replacement in text_tests.lua at line 511[20.461]→[20.176:204](∅→∅),[20.176]→[20.176:204](∅→∅),[20.204]→[20.914:961](∅→∅),[20.961]→[20.222:335](∅→∅),[20.222]→[20.222:335](∅→∅)
Lines = load_array{'abc'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Selection1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.selection1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 521
check_eq(Lines[1].data, 'xbc', 'F - test_edit_deletes_selection')check_eq(Editor_state.lines[1].data, 'xbc', 'F - test_edit_deletes_selection') - replacement in text_tests.lua at line 528[20.501]→[20.211:239](∅→∅),[20.211]→[20.211:239](∅→∅),[20.239]→[20.962:1009](∅→∅),[20.1009]→[20.257:370](∅→∅),[20.257]→[20.257:370](∅→∅)
Lines = load_array{'abc'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Selection1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.selection1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 542
check_nil(Selection1.line, 'F - test_edit_with_shift_key_deletes_selection')check_eq(Lines[1].data, 'Dbc', 'F - test_edit_with_shift_key_deletes_selection/data')check_nil(Editor_state.selection1.line, 'F - test_edit_with_shift_key_deletes_selection')check_eq(Editor_state.lines[1].data, 'Dbc', 'F - test_edit_with_shift_key_deletes_selection/data') - replacement in text_tests.lua at line 550[20.541]→[20.188:216](∅→∅),[20.188]→[20.188:216](∅→∅),[20.216]→[20.1010:1057](∅→∅),[20.1057]→[20.234:347](∅→∅),[20.234]→[20.234:347](∅→∅)
Lines = load_array{'abc'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Selection1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.selection1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 561
check(Selection1.line, 'F - test_copy_does_not_reset_selection')check(Editor_state.selection1.line, 'F - test_copy_does_not_reset_selection') - replacement in text_tests.lua at line 568[20.581]→[20.143:171](∅→∅),[20.143]→[20.143:171](∅→∅),[20.171]→[20.1058:1105](∅→∅),[20.1105]→[20.189:302](∅→∅),[20.189]→[20.189:302](∅→∅)
Lines = load_array{'abc'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Selection1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.selection1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 579
check_eq(Lines[1].data, 'bc', 'F - test_cut/data')check_eq(Editor_state.lines[1].data, 'bc', 'F - test_cut/data') - replacement in text_tests.lua at line 586[20.621]→[20.680:715](∅→∅),[20.680]→[20.680:715](∅→∅),[20.715]→[20.1106:1153](∅→∅),[20.1153]→[20.733:846](∅→∅),[20.733]→[20.733:846](∅→∅)
Lines = load_array{'abc', 'def'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Selection1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.selection1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 599
check_eq(Lines[1].data, 'xyzdef', 'F - test_paste_replaces_selection')check_eq(Editor_state.lines[1].data, 'xyzdef', 'F - test_paste_replaces_selection') - replacement in text_tests.lua at line 606[20.164]→[20.164:213](∅→∅),[20.213]→[20.1154:1201](∅→∅),[20.1201]→[20.245:327](∅→∅),[20.245]→[20.245:327](∅→∅)
Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=2}Screen_top1 = {line=2, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=2}Editor_state.screen_top1 = {line=2, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 612
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 614
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 616
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 619
Selection1 = {line=1, pos=2}Editor_state.selection1 = {line=1, pos=2} - replacement in text_tests.lua at line 623
check_eq(Screen_top1.line, 1, 'F - test_deleting_selection_may_scroll')check_eq(Lines[1].data, 'ahi', 'F - test_deleting_selection_may_scroll/data')check_eq(Editor_state.screen_top1.line, 1, 'F - test_deleting_selection_may_scroll')check_eq(Editor_state.lines[1].data, 'ahi', 'F - test_deleting_selection_may_scroll/data') - replacement in text_tests.lua at line 630[20.2571]→[20.2571:2613](∅→∅),[20.2613]→[20.1202:1249](∅→∅),[20.1249]→[20.2645:2727](∅→∅),[20.2645]→[20.2645:2727](∅→∅)
Lines = load_array{'abc', 'def', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=4}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=4}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 640
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 642
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 644
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 651[20.27]→[20.62:113](∅→∅),[20.113]→[20.3354:3403](∅→∅),[20.3354]→[20.3354:3403](∅→∅),[20.3403]→[20.1250:1297](∅→∅),[20.1297]→[20.3435:3517](∅→∅),[20.3435]→[20.3435:3517](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 658
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 660
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 662
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 666
check_eq(Screen_top1.line, 1, 'F - test_insert_newline/screen_top')check_eq(Cursor1.line, 2, 'F - test_insert_newline/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_insert_newline/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 1, 'F - test_insert_newline/screen_top')check_eq(Editor_state.cursor1.line, 2, 'F - test_insert_newline/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_insert_newline/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 671
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 673
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 680[20.1614]→[20.114:165](∅→∅),[20.165]→[20.1656:1684](∅→∅),[20.1656]→[20.1656:1684](∅→∅),[20.1684]→[20.1298:1345](∅→∅),[20.1345]→[20.1716:1798](∅→∅),[20.1716]→[20.1716:1798](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 688
check_eq(Cursor1.line, 2, 'F - test_insert_newline_at_start_of_line/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_insert_newline_at_start_of_line/cursor:pos')check_eq(Lines[1].data, '', 'F - test_insert_newline_at_start_of_line/data:1')check_eq(Lines[2].data, 'abc', 'F - test_insert_newline_at_start_of_line/data:2')check_eq(Editor_state.cursor1.line, 2, 'F - test_insert_newline_at_start_of_line/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_insert_newline_at_start_of_line/cursor:pos')check_eq(Editor_state.lines[1].data, '', 'F - test_insert_newline_at_start_of_line/data:1')check_eq(Editor_state.lines[2].data, 'abc', 'F - test_insert_newline_at_start_of_line/data:2') - replacement in text_tests.lua at line 697[20.27]→[20.166:217](∅→∅),[20.217]→[20.4546:4595](∅→∅),[20.4546]→[20.4546:4595](∅→∅),[20.4595]→[20.1346:1393](∅→∅),[20.1393]→[20.4627:4709](∅→∅),[20.4627]→[20.4627:4709](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 704
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 706
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 708
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 713
check_eq(Screen_top1.line, 1, 'F - test_insert_from_clipboard/screen_top')check_eq(Cursor1.line, 2, 'F - test_insert_from_clipboard/cursor:line')check_eq(Cursor1.pos, 2, 'F - test_insert_from_clipboard/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 1, 'F - test_insert_from_clipboard/screen_top')check_eq(Editor_state.cursor1.line, 2, 'F - test_insert_from_clipboard/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_insert_from_clipboard/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 718
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 720
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 727[20.5776]→[20.5776:5818](∅→∅),[20.5818]→[20.1394:1441](∅→∅),[20.1441]→[20.5850:5932](∅→∅),[20.5850]→[20.5850:5932](∅→∅),[20.5932]→[20.2:20](∅→∅),[20.20]→[18.617:674](∅→∅),[18.674]→[20.218:279](∅→∅),[20.5988]→[20.218:279](∅→∅),[20.72]→[20.6100:6250](∅→∅),[20.193]→[20.6100:6250](∅→∅),[20.279]→[20.6100:6250](∅→∅),[20.6100]→[20.6100:6250](∅→∅),[20.6250]→[20.21:179](∅→∅)
Lines = load_array{'abc', 'def', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Selection1 = {}edit.draw() -- populate line.y for each line in LinesApp.run_after_mouse_release(Margin_left+8,Margin_top+5, 1)check_eq(Cursor1.line, 1, 'F - test_move_cursor_using_mouse/cursor:line')check_eq(Cursor1.pos, 2, 'F - test_move_cursor_using_mouse/cursor:pos')check_nil(Selection1.line, 'F - test_move_cursor_using_mouse/selection:line')check_nil(Selection1.pos, 'F - test_move_cursor_using_mouse/selection:pos')Editor_state.lines = load_array{'abc', 'def', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {}Editor_state.selection1 = {}edit.draw() -- populate line.y for each line in Editor_state.linesApp.run_after_mouse_release(Editor_state.margin_left+8,Editor_state.margin_top+5, 1)check_eq(Editor_state.cursor1.line, 1, 'F - test_move_cursor_using_mouse/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_move_cursor_using_mouse/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_move_cursor_using_mouse/selection:line')check_nil(Editor_state.selection1.pos, 'F - test_move_cursor_using_mouse/selection:pos') - replacement in text_tests.lua at line 744[20.308]→[20.308:350](∅→∅),[20.350]→[20.1442:1489](∅→∅),[20.1489]→[20.382:482](∅→∅),[20.382]→[20.382:482](∅→∅),[20.482]→[18.675:732](∅→∅)
Lines = load_array{'abc', 'def', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Selection1 = {}edit.draw() -- populate line.y for each line in LinesEditor_state.lines = load_array{'abc', 'def', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {}Editor_state.selection1 = {}edit.draw() -- populate line.y for each line in Editor_state.lines - replacement in text_tests.lua at line 752
App.run_after_mouse_press(Margin_left+8,Margin_top+5, 1)App.run_after_mouse_press(Editor_state.margin_left+8,Editor_state.margin_top+5, 1) - replacement in text_tests.lua at line 754[20.144]→[20.340:414](∅→∅),[20.225]→[20.376:538](∅→∅),[20.342]→[20.376:538](∅→∅),[20.414]→[20.376:538](∅→∅),[20.376]→[20.376:538](∅→∅),[20.538]→[20.2:152](∅→∅)
App.run_after_mouse_release(Margin_left+20,Margin_top+Line_height+5, 1)check_eq(Selection1.line, 1, 'F - test_select_text_using_mouse/selection:line')check_eq(Selection1.pos, 2, 'F - test_select_text_using_mouse/selection:pos')check_eq(Cursor1.line, 2, 'F - test_select_text_using_mouse/cursor:line')check_eq(Cursor1.pos, 4, 'F - test_select_text_using_mouse/cursor:pos')App.run_after_mouse_release(Editor_state.margin_left+20,Editor_state.margin_top+Editor_state.line_height+5, 1)check_eq(Editor_state.selection1.line, 1, 'F - test_select_text_using_mouse/selection:line')check_eq(Editor_state.selection1.pos, 2, 'F - test_select_text_using_mouse/selection:pos')check_eq(Editor_state.cursor1.line, 2, 'F - test_select_text_using_mouse/cursor:line')check_eq(Editor_state.cursor1.pos, 4, 'F - test_select_text_using_mouse/cursor:pos') - replacement in text_tests.lua at line 764[20.687]→[20.687:729](∅→∅),[20.729]→[20.1490:1537](∅→∅),[20.1537]→[20.761:861](∅→∅),[20.761]→[20.761:861](∅→∅),[20.861]→[18.733:790](∅→∅)
Lines = load_array{'abc', 'def', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Selection1 = {}edit.draw() -- populate line.y for each line in LinesEditor_state.lines = load_array{'abc', 'def', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {}Editor_state.selection1 = {}edit.draw() -- populate line.y for each line in Editor_state.lines - replacement in text_tests.lua at line 772
App.run_after_mouse_press(Margin_left+8,Margin_top+5, 1)App.run_after_mouse_release(Margin_left+8,Margin_top+5, 1)App.run_after_mouse_press(Editor_state.margin_left+8,Editor_state.margin_top+5, 1)App.run_after_mouse_release(Editor_state.margin_left+8,Editor_state.margin_top+5, 1) - replacement in text_tests.lua at line 776
App.run_after_mouse_press(Margin_left+20,Margin_top+5, 1)App.run_after_mouse_release(Margin_left+20,Margin_top+Line_height+5, 1)App.run_after_mouse_press(Editor_state.margin_left+20,Editor_state.margin_top+5, 1)App.run_after_mouse_release(Editor_state.margin_left+20,Editor_state.margin_top+Editor_state.line_height+5, 1) - replacement in text_tests.lua at line 779
check_eq(Selection1.line, 1, 'F - test_select_text_using_mouse_and_shift/selection:line')check_eq(Selection1.pos, 2, 'F - test_select_text_using_mouse_and_shift/selection:pos')check_eq(Cursor1.line, 2, 'F - test_select_text_using_mouse_and_shift/cursor:line')check_eq(Cursor1.pos, 4, 'F - test_select_text_using_mouse_and_shift/cursor:pos')check_eq(Editor_state.selection1.line, 1, 'F - test_select_text_using_mouse_and_shift/selection:line')check_eq(Editor_state.selection1.pos, 2, 'F - test_select_text_using_mouse_and_shift/selection:pos')check_eq(Editor_state.cursor1.line, 2, 'F - test_select_text_using_mouse_and_shift/cursor:line')check_eq(Editor_state.cursor1.pos, 4, 'F - test_select_text_using_mouse_and_shift/cursor:pos') - replacement in text_tests.lua at line 788[20.173]→[20.173:215](∅→∅),[20.215]→[20.1538:1585](∅→∅),[20.1585]→[20.247:347](∅→∅),[20.247]→[20.247:347](∅→∅),[20.347]→[18.791:848](∅→∅)
Lines = load_array{'abc', 'def', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Selection1 = {}edit.draw() -- populate line.y for each line in LinesEditor_state.lines = load_array{'abc', 'def', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {}Editor_state.selection1 = {}edit.draw() -- populate line.y for each line in Editor_state.lines - replacement in text_tests.lua at line 796
App.run_after_mouse_press(Margin_left+8,Margin_top+5, 1)App.run_after_mouse_release(Margin_left+8,Margin_top+5, 1)App.run_after_mouse_press(Editor_state.margin_left+8,Editor_state.margin_top+5, 1)App.run_after_mouse_release(Editor_state.margin_left+8,Editor_state.margin_top+5, 1) - replacement in text_tests.lua at line 800
App.run_after_mouse_press(Margin_left+20,Margin_top+5, 1)App.run_after_mouse_release(Margin_left+20,Margin_top+Line_height+5, 1)App.run_after_mouse_press(Editor_state.margin_left+20,Editor_state.margin_top+5, 1)App.run_after_mouse_release(Editor_state.margin_left+20,Editor_state.margin_top+Editor_state.line_height+5, 1) - replacement in text_tests.lua at line 804
App.run_after_mouse_press(Margin_left+20,Margin_top+5, 1)App.run_after_mouse_release(Margin_left+8,Margin_top+Line_height+5, 1)App.run_after_mouse_press(Editor_state.margin_left+20,Editor_state.margin_top+5, 1)App.run_after_mouse_release(Editor_state.margin_left+8,Editor_state.margin_top+Editor_state.line_height+5, 1) - replacement in text_tests.lua at line 808
check_eq(Selection1.line, 1, 'F - test_select_text_repeatedly_using_mouse_and_shift/selection:line')check_eq(Selection1.pos, 2, 'F - test_select_text_repeatedly_using_mouse_and_shift/selection:pos')check_eq(Cursor1.line, 2, 'F - test_select_text_repeatedly_using_mouse_and_shift/cursor:line')check_eq(Cursor1.pos, 2, 'F - test_select_text_repeatedly_using_mouse_and_shift/cursor:pos')check_eq(Editor_state.selection1.line, 1, 'F - test_select_text_repeatedly_using_mouse_and_shift/selection:line')check_eq(Editor_state.selection1.pos, 2, 'F - test_select_text_repeatedly_using_mouse_and_shift/selection:pos')check_eq(Editor_state.cursor1.line, 2, 'F - test_select_text_repeatedly_using_mouse_and_shift/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_select_text_repeatedly_using_mouse_and_shift/cursor:pos') - replacement in text_tests.lua at line 817[20.108]→[20.1061:1112](∅→∅),[20.1112]→[20.150:199](∅→∅),[20.150]→[20.150:199](∅→∅),[20.199]→[20.1586:1633](∅→∅),[20.1633]→[20.231:331](∅→∅),[20.231]→[20.231:331](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Selection1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {}Editor_state.selection1 = {} - replacement in text_tests.lua at line 828
check_nil(Selection1.line, 'F - test_cut_without_selection')check_nil(Editor_state.selection1.line, 'F - test_cut_without_selection') - replacement in text_tests.lua at line 834[20.6350]→[20.6350:6392](∅→∅),[20.6392]→[20.1634:1681](∅→∅),[20.1681]→[20.6424:6506](∅→∅),[20.6424]→[20.6424:6506](∅→∅)
Lines = load_array{'abc', 'def', 'ghi'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'ghi'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 841
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 843
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 847
check_eq(Screen_top1.line, 2, 'F - test_pagedown/screen_top')check_eq(Cursor1.line, 2, 'F - test_pagedown/cursor')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_pagedown/screen_top')check_eq(Editor_state.cursor1.line, 2, 'F - test_pagedown/cursor')y = Editor_state.margin_top - replacement in text_tests.lua at line 851
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 859
App.screen.init{width=Margin_left+drawing_width, height=80}Lines = load_array{'abc', -- height 15App.screen.init{width=Editor_state.margin_left+drawing_width, height=80}Editor_state.lines = load_array{'abc', -- height 15 - replacement in text_tests.lua at line 864[20.7514]→[20.1682:1729](∅→∅),[20.1729]→[20.7514:7602](∅→∅),[20.7514]→[20.7514:7602](∅→∅),[20.7634]→[20.7634:7716](∅→∅),[20.7716]→[20.92:170](∅→∅)
Margin_right = 0; Margin_width = Margin_leftcheck_eq(Lines[2].mode, 'drawing', 'F - test_pagedown_skips_drawings/baseline/lines')Cursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}local drawing_height = Drawing_padding_height + drawing_width/2 -- defaultEditor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftcheck_eq(Editor_state.lines[2].mode, 'drawing', 'F - test_pagedown_skips_drawings/baseline/lines')Editor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {}local drawing_height = Editor_state.drawing_padding_height + drawing_width/2 -- default - replacement in text_tests.lua at line 873
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 878
check_eq(Screen_top1.line, 2, 'F - test_pagedown_skips_drawings/screen_top')check_eq(Cursor1.line, 3, 'F - test_pagedown_skips_drawings/cursor')y = Margin_top + drawing_heightcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_pagedown_skips_drawings/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_pagedown_skips_drawings/cursor')y = Editor_state.margin_top + drawing_height - replacement in text_tests.lua at line 888[20.8730]→[20.8730:8780](∅→∅),[20.8780]→[20.1730:1777](∅→∅),[20.1777]→[20.8812:8894](∅→∅),[20.8812]→[20.8812:8894](∅→∅)
Lines = load_array{'abc', 'def ghi jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def ghi jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 894
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 896
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 898
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 902
check_eq(Screen_top1.line, 2, 'F - test_pagedown_often_shows_start_of_wrapping_line/screen_top:line')check_eq(Screen_top1.pos, 1, 'F - test_pagedown_often_shows_start_of_wrapping_line/screen_top:pos')check_eq(Cursor1.line, 2, 'F - test_pagedown_often_shows_start_of_wrapping_line/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_pagedown_often_shows_start_of_wrapping_line/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_pagedown_often_shows_start_of_wrapping_line/screen_top:line')check_eq(Editor_state.screen_top1.pos, 1, 'F - test_pagedown_often_shows_start_of_wrapping_line/screen_top:pos')check_eq(Editor_state.cursor1.line, 2, 'F - test_pagedown_often_shows_start_of_wrapping_line/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_pagedown_often_shows_start_of_wrapping_line/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 908
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 910
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 917[20.1475]→[20.1113:1164](∅→∅),[20.1164]→[20.1517:1596](∅→∅),[20.1517]→[20.1517:1596](∅→∅),[20.1596]→[20.1778:1825](∅→∅),[20.1825]→[20.1628:1710](∅→∅),[20.1628]→[20.1628:1710](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc def ghi jkl mno pqr stu vwx yza bcd efg hij', 'XYZ'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc def ghi jkl mno pqr stu vwx yza bcd efg hij', 'XYZ'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 924
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 926
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 928
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 932
check_eq(Screen_top1.line, 1, 'F - test_pagedown_can_start_from_middle_of_long_wrapping_line/screen_top:line')check_eq(Screen_top1.pos, 9, 'F - test_pagedown_can_start_from_middle_of_long_wrapping_line/screen_top:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 1, 'F - test_pagedown_can_start_from_middle_of_long_wrapping_line/screen_top:line')check_eq(Editor_state.screen_top1.pos, 9, 'F - test_pagedown_can_start_from_middle_of_long_wrapping_line/screen_top:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 936
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 938
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 945[20.10220]→[20.10220:10269](∅→∅),[20.10269]→[20.1826:1873](∅→∅),[20.1873]→[20.10301:10383](∅→∅),[20.10301]→[20.10301:10383](∅→∅)
Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 952
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 954
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 956
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 960
check_eq(Screen_top1.line, 1, 'F - test_down_arrow_moves_cursor/screen_top')check_eq(Cursor1.line, 2, 'F - test_down_arrow_moves_cursor/cursor')check_eq(Editor_state.screen_top1.line, 1, 'F - test_down_arrow_moves_cursor/screen_top')check_eq(Editor_state.cursor1.line, 2, 'F - test_down_arrow_moves_cursor/cursor') - replacement in text_tests.lua at line 963
y = Margin_topy = Editor_state.margin_top - replacement in text_tests.lua at line 965
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 967
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 975[20.11549]→[20.11549:11598](∅→∅),[20.11598]→[20.1874:1921](∅→∅),[20.1921]→[20.11630:11712](∅→∅),[20.11630]→[20.11630:11712](∅→∅)
Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 981
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 983
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 985
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 989
check_eq(Screen_top1.line, 2, 'F - test_down_arrow_scrolls_down_by_one_line/screen_top')check_eq(Cursor1.line, 4, 'F - test_down_arrow_scrolls_down_by_one_line/cursor')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_down_arrow_scrolls_down_by_one_line/screen_top')check_eq(Editor_state.cursor1.line, 4, 'F - test_down_arrow_scrolls_down_by_one_line/cursor')y = Editor_state.margin_top - replacement in text_tests.lua at line 993
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 995
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1002[20.12871]→[20.1165:1216](∅→∅),[20.1216]→[20.12913:12966](∅→∅),[20.12913]→[20.12913:12966](∅→∅),[20.12966]→[20.1922:1969](∅→∅),[20.1969]→[20.12998:13080](∅→∅),[20.12998]→[20.12998:13080](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1009
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1011
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1013
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1017
check_eq(Screen_top1.line, 2, 'F - test_down_arrow_scrolls_down_by_one_screen_line/screen_top')check_eq(Cursor1.line, 3, 'F - test_down_arrow_scrolls_down_by_one_screen_line/cursor:line')check_eq(Cursor1.pos, 5, 'F - test_down_arrow_scrolls_down_by_one_screen_line/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_down_arrow_scrolls_down_by_one_screen_line/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_down_arrow_scrolls_down_by_one_screen_line/cursor:line')check_eq(Editor_state.cursor1.pos, 5, 'F - test_down_arrow_scrolls_down_by_one_screen_line/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1022
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1024
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1031[20.14498]→[20.1217:1268](∅→∅),[20.1268]→[20.14540:14592](∅→∅),[20.14540]→[20.14540:14592](∅→∅),[20.14592]→[20.1970:2017](∅→∅),[20.2017]→[20.14624:14706](∅→∅),[20.14624]→[20.14624:14706](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghijkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghijkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1038
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1040
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1042
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1046
check_eq(Screen_top1.line, 2, 'F - test_down_arrow_scrolls_down_by_one_screen_line_after_splitting_within_word/screen_top')check_eq(Cursor1.line, 3, 'F - test_down_arrow_scrolls_down_by_one_screen_line_after_splitting_within_word/cursor:line')check_eq(Cursor1.pos, 6, 'F - test_down_arrow_scrolls_down_by_one_screen_line_after_splitting_within_word/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_down_arrow_scrolls_down_by_one_screen_line_after_splitting_within_word/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_down_arrow_scrolls_down_by_one_screen_line_after_splitting_within_word/cursor:line')check_eq(Editor_state.cursor1.pos, 6, 'F - test_down_arrow_scrolls_down_by_one_screen_line_after_splitting_within_word/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1051
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1053
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1059[20.16235]→[20.1269:1320](∅→∅),[20.1320]→[20.16277:16329](∅→∅),[20.16277]→[20.16277:16329](∅→∅),[20.16329]→[20.2018:2065](∅→∅),[20.2065]→[20.16361:16443](∅→∅),[20.16361]→[20.16361:16443](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghijkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghijkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1066
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1068
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1070
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1074
check_eq(Screen_top1.line, 3, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/baseline2/screen_top')check_eq(Cursor1.line, 3, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/baseline2/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/baseline2/cursor:pos')check_eq(Editor_state.screen_top1.line, 3, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/baseline2/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/baseline2/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/baseline2/cursor:pos') - replacement in text_tests.lua at line 1079
check_eq(Screen_top1.line, 3, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/screen_top')check_eq(Cursor1.line, 3, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/cursor:line')check_eq(Cursor1.pos, 6, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 3, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/cursor:line')check_eq(Editor_state.cursor1.pos, 6, 'F - test_page_down_followed_by_down_arrow_does_not_scroll_screen_up/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1084
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1086
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1094[20.18405]→[20.18405:18454](∅→∅),[20.18454]→[20.2066:2113](∅→∅),[20.2113]→[20.18473:18555](∅→∅),[20.18473]→[20.18473:18555](∅→∅)
Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1100
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1102
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1104
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1108
check_eq(Screen_top1.line, 1, 'F - test_up_arrow_moves_cursor/screen_top')check_eq(Cursor1.line, 2, 'F - test_up_arrow_moves_cursor/cursor')check_eq(Editor_state.screen_top1.line, 1, 'F - test_up_arrow_moves_cursor/screen_top')check_eq(Editor_state.cursor1.line, 2, 'F - test_up_arrow_moves_cursor/cursor') - replacement in text_tests.lua at line 1111
y = Margin_topy = Editor_state.margin_top - replacement in text_tests.lua at line 1113
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1115
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1123[20.19624]→[20.19624:19673](∅→∅),[20.19673]→[20.2114:2161](∅→∅),[20.2161]→[20.19692:19774](∅→∅),[20.19692]→[20.19692:19774](∅→∅)
Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Screen_top1 = {line=2, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.screen_top1 = {line=2, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1129
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1131
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1133
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1137
check_eq(Screen_top1.line, 1, 'F - test_up_arrow_scrolls_up_by_one_line/screen_top')check_eq(Cursor1.line, 1, 'F - test_up_arrow_scrolls_up_by_one_line/cursor')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 1, 'F - test_up_arrow_scrolls_up_by_one_line/screen_top')check_eq(Editor_state.cursor1.line, 1, 'F - test_up_arrow_scrolls_up_by_one_line/cursor')y = Editor_state.margin_top - replacement in text_tests.lua at line 1141
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1143
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1150[20.20879]→[20.1321:1372](∅→∅),[20.1372]→[20.20921:20974](∅→∅),[20.20921]→[20.20921:20974](∅→∅),[20.20974]→[20.2162:2209](∅→∅),[20.2209]→[20.21006:21088](∅→∅),[20.21006]→[20.21006:21088](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=6}Screen_top1 = {line=3, pos=5}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=6}Editor_state.screen_top1 = {line=3, pos=5}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1157
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1159
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1163
y = Margin_topy = Editor_state.margin_top - replacement in text_tests.lua at line 1165
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1167
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1169
check_eq(Screen_top1.line, 3, 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen_top')check_eq(Screen_top1.pos, 1, 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen_top')check_eq(Cursor1.line, 3, 'F - test_up_arrow_scrolls_up_by_one_screen_line/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_up_arrow_scrolls_up_by_one_screen_line/cursor:pos')check_eq(Editor_state.screen_top1.line, 3, 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen_top')check_eq(Editor_state.screen_top1.pos, 1, 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_up_arrow_scrolls_up_by_one_screen_line/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_up_arrow_scrolls_up_by_one_screen_line/cursor:pos') - replacement in text_tests.lua at line 1178[20.22319]→[20.1373:1424](∅→∅),[20.1424]→[20.22361:22414](∅→∅),[20.22361]→[20.22361:22414](∅→∅),[20.22414]→[20.2210:2257](∅→∅),[20.2257]→[20.22446:22528](∅→∅),[20.22446]→[20.22446:22528](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc def', 'ghi', 'jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Screen_top1 = {line=2, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc def', 'ghi', 'jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.screen_top1 = {line=2, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1185
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1187
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1189
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1193
y = Margin_topy = Editor_state.margin_top - replacement in text_tests.lua at line 1195
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1197
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1199
check_eq(Screen_top1.line, 1, 'F - test_up_arrow_scrolls_up_to_final_screen_line/screen_top')check_eq(Screen_top1.pos, 5, 'F - test_up_arrow_scrolls_up_to_final_screen_line/screen_top')check_eq(Cursor1.line, 1, 'F - test_up_arrow_scrolls_up_to_final_screen_line/cursor:line')check_eq(Cursor1.pos, 5, 'F - test_up_arrow_scrolls_up_to_final_screen_line/cursor:pos')check_eq(Editor_state.screen_top1.line, 1, 'F - test_up_arrow_scrolls_up_to_final_screen_line/screen_top')check_eq(Editor_state.screen_top1.pos, 5, 'F - test_up_arrow_scrolls_up_to_final_screen_line/screen_top')check_eq(Editor_state.cursor1.line, 1, 'F - test_up_arrow_scrolls_up_to_final_screen_line/cursor:line')check_eq(Editor_state.cursor1.pos, 5, 'F - test_up_arrow_scrolls_up_to_final_screen_line/cursor:pos') - replacement in text_tests.lua at line 1209[20.23975]→[20.23975:24028](∅→∅),[20.24028]→[20.2258:2305](∅→∅),[20.2305]→[20.24047:24129](∅→∅),[20.24047]→[20.24047:24129](∅→∅)
Lines = load_array{'', 'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Screen_top1 = {line=2, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'', 'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.screen_top1 = {line=2, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1215
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1217
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1219
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1223
check_eq(Screen_top1.line, 1, 'F - test_up_arrow_scrolls_up_to_empty_line/screen_top')check_eq(Cursor1.line, 1, 'F - test_up_arrow_scrolls_up_to_empty_line/cursor')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 1, 'F - test_up_arrow_scrolls_up_to_empty_line/screen_top')check_eq(Editor_state.cursor1.line, 1, 'F - test_up_arrow_scrolls_up_to_empty_line/cursor')y = Editor_state.margin_top - replacement in text_tests.lua at line 1227
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1229
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1236[20.25102]→[20.25102:25144](∅→∅),[20.25144]→[20.2306:2353](∅→∅),[20.2353]→[20.25176:25258](∅→∅),[20.25176]→[20.25176:25258](∅→∅)
Lines = load_array{'abc', 'def', 'ghi'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Screen_top1 = {line=2, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'ghi'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.screen_top1 = {line=2, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1243
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1245
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1249
check_eq(Screen_top1.line, 1, 'F - test_pageup/screen_top')check_eq(Cursor1.line, 1, 'F - test_pageup/cursor')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 1, 'F - test_pageup/screen_top')check_eq(Editor_state.cursor1.line, 1, 'F - test_pageup/cursor')y = Editor_state.margin_top - replacement in text_tests.lua at line 1253
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1260[20.26026]→[20.1425:1476](∅→∅),[20.1476]→[20.26068:26121](∅→∅),[20.26068]→[20.26068:26121](∅→∅),[20.26121]→[20.2354:2401](∅→∅),[20.2401]→[20.26153:26235](∅→∅),[20.26153]→[20.26153:26235](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc def', 'ghi', 'jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Screen_top1 = {line=2, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc def', 'ghi', 'jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.screen_top1 = {line=2, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1267
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1269
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1271
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1275
check_eq(Screen_top1.line, 1, 'F - test_pageup_scrolls_up_by_screen_line/screen_top')check_eq(Cursor1.line, 1, 'F - test_pageup_scrolls_up_by_screen_line/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_pageup_scrolls_up_by_screen_line/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 1, 'F - test_pageup_scrolls_up_by_screen_line/screen_top')check_eq(Editor_state.cursor1.line, 1, 'F - test_pageup_scrolls_up_by_screen_line/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_pageup_scrolls_up_by_screen_line/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1280
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1282
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1288[20.27430]→[20.27430:27508](∅→∅),[20.27508]→[20.1477:1528](∅→∅),[20.1528]→[20.27550:27600](∅→∅),[20.27550]→[20.27550:27600](∅→∅),[20.27600]→[20.2402:2449](∅→∅),[20.2449]→[20.27632:27714](∅→∅),[20.27632]→[20.27632:27714](∅→∅)
-- display a few lines starting from the middle of a line (Cursor1.pos > 1)App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc def', 'ghi jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=5}Screen_top1 = {line=2, pos=5}Screen_bottom1 = {}-- display a few lines starting from the middle of a line (Editor_state.cursor1.pos > 1)App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc def', 'ghi jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=5}Editor_state.screen_top1 = {line=2, pos=5}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1296
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1298
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1302
check_eq(Screen_top1.line, 1, 'F - test_pageup_scrolls_up_from_middle_screen_line/screen_top')check_eq(Cursor1.line, 1, 'F - test_pageup_scrolls_up_from_middle_screen_line/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_pageup_scrolls_up_from_middle_screen_line/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 1, 'F - test_pageup_scrolls_up_from_middle_screen_line/screen_top')check_eq(Editor_state.cursor1.line, 1, 'F - test_pageup_scrolls_up_from_middle_screen_line/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_pageup_scrolls_up_from_middle_screen_line/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1307
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1309
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1316[20.28904]→[20.1529:1580](∅→∅),[20.1580]→[20.28946:28995](∅→∅),[20.28946]→[20.28946:28995](∅→∅),[20.28995]→[20.2450:2497](∅→∅),[20.2497]→[20.29027:29109](∅→∅),[20.29027]→[20.29027:29109](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1323
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1325
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1327
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1331
check_eq(Screen_top1.line, 2, 'F - test_enter_on_bottom_line_scrolls_down/screen_top')check_eq(Cursor1.line, 4, 'F - test_enter_on_bottom_line_scrolls_down/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_enter_on_bottom_line_scrolls_down/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_enter_on_bottom_line_scrolls_down/screen_top')check_eq(Editor_state.cursor1.line, 4, 'F - test_enter_on_bottom_line_scrolls_down/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_enter_on_bottom_line_scrolls_down/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1336
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1338
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1345[20.30337]→[20.1581:1632](∅→∅),[20.1632]→[20.30379:30428](∅→∅),[20.30379]→[20.30379:30428](∅→∅),[20.30428]→[20.2498:2545](∅→∅),[20.2545]→[20.30460:30542](∅→∅),[20.30460]→[20.30460:30542](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=4, pos=2}Screen_top1 = {line=4, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=4, pos=2}Editor_state.screen_top1 = {line=4, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1352
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1356
check_eq(Screen_top1.line, 4, 'F - test_enter_on_final_line_avoids_scrolling_down_when_not_at_bottom/screen_top')check_eq(Cursor1.line, 5, 'F - test_enter_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_enter_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 4, 'F - test_enter_on_final_line_avoids_scrolling_down_when_not_at_bottom/screen_top')check_eq(Editor_state.cursor1.line, 5, 'F - test_enter_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_enter_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1361
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1368[20.328]→[20.1633:1684](∅→∅),[20.1684]→[20.370:402](∅→∅),[20.370]→[20.370:402](∅→∅),[20.402]→[20.2546:2593](∅→∅),[20.2593]→[20.434:516](∅→∅),[20.434]→[20.434:516](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', ''}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Screen_top1 = {line=2, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', ''}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.screen_top1 = {line=2, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1377
check_eq(Screen_top1.line, 2, 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/screen_top')check_eq(Cursor1.line, 2, 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:line')check_eq(Cursor1.pos, 2, 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:pos')local y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/screen_top')check_eq(Editor_state.cursor1.line, 2, 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:pos')local y = Editor_state.margin_top - replacement in text_tests.lua at line 1387[20.175]→[20.1685:1736](∅→∅),[20.1736]→[20.217:266](∅→∅),[20.217]→[20.217:266](∅→∅),[20.266]→[20.2594:2641](∅→∅),[20.2641]→[20.298:380](∅→∅),[20.298]→[20.298:380](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=4}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=4}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1394
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1396
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1398
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1404
check_eq(Screen_top1.line, 2, 'F - test_typing_on_bottom_line_scrolls_down/screen_top')check_eq(Cursor1.line, 3, 'F - test_typing_on_bottom_line_scrolls_down/cursor:line')check_eq(Cursor1.pos, 7, 'F - test_typing_on_bottom_line_scrolls_down/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_typing_on_bottom_line_scrolls_down/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_typing_on_bottom_line_scrolls_down/cursor:line')check_eq(Editor_state.cursor1.pos, 7, 'F - test_typing_on_bottom_line_scrolls_down/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1409
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1411
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1418[20.182]→[20.182:286](∅→∅),[20.286]→[20.2642:2689](∅→∅),[20.2689]→[20.318:372](∅→∅),[20.318]→[20.318:372](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftScreen_top1 = {line=3, pos=5}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.screen_top1 = {line=3, pos=5}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1424
Cursor1 = {line=3, pos=5}Editor_state.cursor1 = {line=3, pos=5} - replacement in text_tests.lua at line 1426
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1428
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1432
y = Margin_topy = Editor_state.margin_top - replacement in text_tests.lua at line 1434
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1436
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1438
check_eq(Screen_top1.line, 3, 'F - test_left_arrow_scrolls_up_in_wrapped_line/screen_top')check_eq(Screen_top1.pos, 1, 'F - test_left_arrow_scrolls_up_in_wrapped_line/screen_top')check_eq(Cursor1.line, 3, 'F - test_left_arrow_scrolls_up_in_wrapped_line/cursor:line')check_eq(Cursor1.pos, 4, 'F - test_left_arrow_scrolls_up_in_wrapped_line/cursor:pos')check_eq(Editor_state.screen_top1.line, 3, 'F - test_left_arrow_scrolls_up_in_wrapped_line/screen_top')check_eq(Editor_state.screen_top1.pos, 1, 'F - test_left_arrow_scrolls_up_in_wrapped_line/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_left_arrow_scrolls_up_in_wrapped_line/cursor:line')check_eq(Editor_state.cursor1.pos, 4, 'F - test_left_arrow_scrolls_up_in_wrapped_line/cursor:pos') - replacement in text_tests.lua at line 1447[20.1677]→[20.1677:1781](∅→∅),[20.1781]→[20.2690:2737](∅→∅),[20.2737]→[20.1813:1867](∅→∅),[20.1813]→[20.1813:1867](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftScreen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1453
Cursor1 = {line=3, pos=5}Editor_state.cursor1 = {line=3, pos=5} - replacement in text_tests.lua at line 1455
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1457
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1459
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1463
check_eq(Screen_top1.line, 2, 'F - test_right_arrow_scrolls_down_in_wrapped_line/screen_top')check_eq(Cursor1.line, 3, 'F - test_right_arrow_scrolls_down_in_wrapped_line/cursor:line')check_eq(Cursor1.pos, 6, 'F - test_right_arrow_scrolls_down_in_wrapped_line/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_right_arrow_scrolls_down_in_wrapped_line/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_right_arrow_scrolls_down_in_wrapped_line/cursor:line')check_eq(Editor_state.cursor1.pos, 6, 'F - test_right_arrow_scrolls_down_in_wrapped_line/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1468
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1470
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1477[20.3252]→[20.3252:3356](∅→∅),[20.3356]→[20.2738:2785](∅→∅),[20.2785]→[20.3388:3442](∅→∅),[20.3388]→[20.3388:3442](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftScreen_top1 = {line=3, pos=5}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.screen_top1 = {line=3, pos=5}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1483
Cursor1 = {line=3, pos=5}Editor_state.cursor1 = {line=3, pos=5} - replacement in text_tests.lua at line 1485
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1487
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1491
y = Margin_topy = Editor_state.margin_top - replacement in text_tests.lua at line 1493
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1495
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1497
check_eq(Screen_top1.line, 3, 'F - test_home_scrolls_up_in_wrapped_line/screen_top')check_eq(Screen_top1.pos, 1, 'F - test_home_scrolls_up_in_wrapped_line/screen_top')check_eq(Cursor1.line, 3, 'F - test_home_scrolls_up_in_wrapped_line/cursor:line')check_eq(Cursor1.pos, 1, 'F - test_home_scrolls_up_in_wrapped_line/cursor:pos')check_eq(Editor_state.screen_top1.line, 3, 'F - test_home_scrolls_up_in_wrapped_line/screen_top')check_eq(Editor_state.screen_top1.pos, 1, 'F - test_home_scrolls_up_in_wrapped_line/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_home_scrolls_up_in_wrapped_line/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_home_scrolls_up_in_wrapped_line/cursor:pos') - replacement in text_tests.lua at line 1506[20.4663]→[20.4663:4767](∅→∅),[20.4767]→[20.2786:2833](∅→∅),[20.2833]→[20.4799:4853](∅→∅),[20.4799]→[20.4799:4853](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftScreen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1512
Cursor1 = {line=3, pos=5}Editor_state.cursor1 = {line=3, pos=5} - replacement in text_tests.lua at line 1514
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1516
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1518
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1522
check_eq(Screen_top1.line, 2, 'F - test_end_scrolls_down_in_wrapped_line/screen_top')check_eq(Cursor1.line, 3, 'F - test_end_scrolls_down_in_wrapped_line/cursor:line')check_eq(Cursor1.pos, 8, 'F - test_end_scrolls_down_in_wrapped_line/cursor:pos')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 2, 'F - test_end_scrolls_down_in_wrapped_line/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_end_scrolls_down_in_wrapped_line/cursor:line')check_eq(Editor_state.cursor1.pos, 8, 'F - test_end_scrolls_down_in_wrapped_line/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1527
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1529
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1537[20.663]→[20.31623:31679](∅→∅),[20.31623]→[20.31623:31679](∅→∅),[20.31679]→[20.2834:2881](∅→∅),[20.2881]→[20.31698:31781](∅→∅),[20.31698]→[20.31698:31781](∅→∅)
Lines = load_array{'abc def ghi jkl mno pqr ', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=25}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc def ghi jkl mno pqr ', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=25}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1543
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1545
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1547
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1553
check_eq(Cursor1.pos, 28, 'F - test_move_cursor_using_mouse/cursor:pos')y = Margin_topcheck_eq(Editor_state.cursor1.pos, 28, 'F - test_move_cursor_using_mouse/cursor:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1556
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1558
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1561
App.run_after_mouse_release(Margin_left+8,Margin_top+Line_height*2+5, 1)App.run_after_mouse_release(Editor_state.margin_left+8,Editor_state.margin_top+Editor_state.line_height*2+5, 1) - replacement in text_tests.lua at line 1563
check_eq(Cursor1.line, 1, 'F - test_move_cursor_using_mouse/cursor:line')check_eq(Cursor1.pos, 26, 'F - test_move_cursor_using_mouse/cursor:pos')check_eq(Editor_state.cursor1.line, 1, 'F - test_move_cursor_using_mouse/cursor:line')check_eq(Editor_state.cursor1.pos, 26, 'F - test_move_cursor_using_mouse/cursor:pos') - replacement in text_tests.lua at line 1571[20.33490]→[20.33490:33539](∅→∅),[20.33539]→[20.2882:2929](∅→∅),[20.2929]→[20.33558:33640](∅→∅),[20.33558]→[20.33558:33640](∅→∅)
Lines = load_array{'abc', 'def', 'ghi', 'jkl'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Screen_top1 = {line=2, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.screen_top1 = {line=2, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1577
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1579
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1581
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1585
check_eq(Screen_top1.line, 1, 'F - test_backspace_can_scroll_up/screen_top')check_eq(Cursor1.line, 1, 'F - test_backspace_can_scroll_up/cursor')y = Margin_topcheck_eq(Editor_state.screen_top1.line, 1, 'F - test_backspace_can_scroll_up/screen_top')check_eq(Editor_state.cursor1.line, 1, 'F - test_backspace_can_scroll_up/cursor')y = Editor_state.margin_top - replacement in text_tests.lua at line 1589
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1591
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1598[20.34682]→[20.1813:1864](∅→∅),[20.1864]→[20.34724:34777](∅→∅),[20.34724]→[20.34724:34777](∅→∅),[20.34777]→[20.2930:2977](∅→∅),[20.2977]→[20.34809:34891](∅→∅),[20.34809]→[20.34809:34891](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=3, pos=5}Screen_top1 = {line=3, pos=5}Screen_bottom1 = {}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=3, pos=5}Editor_state.screen_top1 = {line=3, pos=5}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1605
local y = Margin_toplocal y = Editor_state.margin_top - replacement in text_tests.lua at line 1607
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1611
y = Margin_topy = Editor_state.margin_top - replacement in text_tests.lua at line 1613
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1615
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1617
check_eq(Screen_top1.line, 3, 'F - test_backspace_can_scroll_up_screen_line/screen_top')check_eq(Screen_top1.pos, 1, 'F - test_backspace_can_scroll_up_screen_line/screen_top')check_eq(Cursor1.line, 3, 'F - test_backspace_can_scroll_up_screen_line/cursor:line')check_eq(Cursor1.pos, 4, 'F - test_backspace_can_scroll_up_screen_line/cursor:pos')check_eq(Editor_state.screen_top1.line, 3, 'F - test_backspace_can_scroll_up_screen_line/screen_top')check_eq(Editor_state.screen_top1.pos, 1, 'F - test_backspace_can_scroll_up_screen_line/screen_top')check_eq(Editor_state.cursor1.line, 3, 'F - test_backspace_can_scroll_up_screen_line/cursor:line')check_eq(Editor_state.cursor1.pos, 4, 'F - test_backspace_can_scroll_up_screen_line/cursor:pos') - replacement in text_tests.lua at line 1626[20.2360]→[20.1865:1916](∅→∅),[20.1916]→[20.2402:2437](∅→∅),[20.2402]→[20.2402:2437](∅→∅),[20.2437]→[20.2978:3025](∅→∅),[20.3025]→[20.2469:2497](∅→∅),[20.2469]→[20.2469:2497](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1} - replacement in text_tests.lua at line 1632
check_eq(Lines[1].data, 'abcdef', "F - test_backspace_past_line_boundary")check_eq(Editor_state.lines[1].data, 'abcdef', "F - test_backspace_past_line_boundary") - replacement in text_tests.lua at line 1641[20.36235]→[20.1917:1968](∅→∅),[20.1968]→[20.36277:36333](∅→∅),[20.36277]→[20.36277:36333](∅→∅),[20.36333]→[20.3026:3073](∅→∅),[20.3073]→[20.36365:36424](∅→∅),[20.36365]→[20.36365:36424](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Selection1 = {line=1, pos=2}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.selection1 = {line=1, pos=2} - replacement in text_tests.lua at line 1648
check_eq(Lines[1].data, 'bc', "F - test_backspace_over_selection/data")check_eq(Editor_state.lines[1].data, 'bc', "F - test_backspace_over_selection/data") - replacement in text_tests.lua at line 1650
check_eq(Cursor1.line, 1, "F - test_backspace_over_selection/cursor:line")check_eq(Cursor1.pos, 1, "F - test_backspace_over_selection/cursor:pos")check_eq(Editor_state.cursor1.line, 1, "F - test_backspace_over_selection/cursor:line")check_eq(Editor_state.cursor1.pos, 1, "F - test_backspace_over_selection/cursor:pos") - replacement in text_tests.lua at line 1653
check_nil(Selection1.line, "F - test_backspace_over_selection/selection")check_nil(Editor_state.selection1.line, "F - test_backspace_over_selection/selection") - replacement in text_tests.lua at line 1659[20.37096]→[20.1969:2020](∅→∅),[20.2020]→[20.37138:37194](∅→∅),[20.37138]→[20.37138:37194](∅→∅),[20.37194]→[20.3074:3121](∅→∅),[20.3121]→[20.37226:37285](∅→∅),[20.37226]→[20.37226:37285](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=2}Selection1 = {line=1, pos=1}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=2}Editor_state.selection1 = {line=1, pos=1} - replacement in text_tests.lua at line 1666
check_eq(Lines[1].data, 'bc', "F - test_backspace_over_selection_reverse/data")check_eq(Editor_state.lines[1].data, 'bc', "F - test_backspace_over_selection_reverse/data") - replacement in text_tests.lua at line 1668
check_eq(Cursor1.line, 1, "F - test_backspace_over_selection_reverse/cursor:line")check_eq(Cursor1.pos, 1, "F - test_backspace_over_selection_reverse/cursor:pos")check_eq(Editor_state.cursor1.line, 1, "F - test_backspace_over_selection_reverse/cursor:line")check_eq(Editor_state.cursor1.pos, 1, "F - test_backspace_over_selection_reverse/cursor:pos") - replacement in text_tests.lua at line 1671
check_nil(Selection1.line, "F - test_backspace_over_selection_reverse/selection")check_nil(Editor_state.selection1.line, "F - test_backspace_over_selection_reverse/selection") - replacement in text_tests.lua at line 1677[20.37944]→[20.2021:2072](∅→∅),[20.2072]→[20.37986:38042](∅→∅),[20.37986]→[20.37986:38042](∅→∅),[20.38042]→[20.3122:3169](∅→∅),[20.3169]→[20.38074:38133](∅→∅),[20.38074]→[20.38074:38133](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=2}Selection1 = {line=4, pos=2}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=2}Editor_state.selection1 = {line=4, pos=2} - replacement in text_tests.lua at line 1684
check_eq(Lines[1].data, 'akl', "F - test_backspace_over_multiple_lines/data:1")check_eq(Lines[2].data, 'mno', "F - test_backspace_over_multiple_lines/data:2")check_eq(Editor_state.lines[1].data, 'akl', "F - test_backspace_over_multiple_lines/data:1")check_eq(Editor_state.lines[2].data, 'mno', "F - test_backspace_over_multiple_lines/data:2") - replacement in text_tests.lua at line 1687
check_eq(Cursor1.line, 1, "F - test_backspace_over_multiple_lines/cursor:line")check_eq(Cursor1.pos, 2, "F - test_backspace_over_multiple_lines/cursor:pos")check_eq(Editor_state.cursor1.line, 1, "F - test_backspace_over_multiple_lines/cursor:line")check_eq(Editor_state.cursor1.pos, 2, "F - test_backspace_over_multiple_lines/cursor:pos") - replacement in text_tests.lua at line 1690
check_nil(Selection1.line, "F - test_backspace_over_multiple_lines/selection")check_nil(Editor_state.selection1.line, "F - test_backspace_over_multiple_lines/selection") - replacement in text_tests.lua at line 1696[20.38875]→[20.2073:2124](∅→∅),[20.2124]→[20.38917:38973](∅→∅),[20.38917]→[20.38917:38973](∅→∅),[20.38973]→[20.3170:3217](∅→∅),[20.3217]→[20.39005:39064](∅→∅),[20.39005]→[20.39005:39064](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=2}Selection1 = {line=1, pos=4}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=2}Editor_state.selection1 = {line=1, pos=4} - replacement in text_tests.lua at line 1703
check_eq(Lines[1].data, 'a', "F - test_backspace_to_start_of_line/data:1")check_eq(Lines[2].data, 'def', "F - test_backspace_to_start_of_line/data:2")check_eq(Editor_state.lines[1].data, 'a', "F - test_backspace_to_start_of_line/data:1")check_eq(Editor_state.lines[2].data, 'def', "F - test_backspace_to_start_of_line/data:2") - replacement in text_tests.lua at line 1706
check_eq(Cursor1.line, 1, "F - test_backspace_to_start_of_line/cursor:line")check_eq(Cursor1.pos, 2, "F - test_backspace_to_start_of_line/cursor:pos")check_eq(Editor_state.cursor1.line, 1, "F - test_backspace_to_start_of_line/cursor:line")check_eq(Editor_state.cursor1.pos, 2, "F - test_backspace_to_start_of_line/cursor:pos") - replacement in text_tests.lua at line 1709
check_nil(Selection1.line, "F - test_backspace_to_start_of_line/selection")check_nil(Editor_state.selection1.line, "F - test_backspace_to_start_of_line/selection") - replacement in text_tests.lua at line 1715[20.39774]→[20.2125:2176](∅→∅),[20.2176]→[20.39816:39872](∅→∅),[20.39816]→[20.39816:39872](∅→∅),[20.39872]→[20.3218:3265](∅→∅),[20.3265]→[20.39904:39963](∅→∅),[20.39904]→[20.39904:39963](∅→∅)
App.screen.init{width=Margin_left+30, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=1}Selection1 = {line=2, pos=3}App.screen.init{width=Editor_state.margin_left+30, height=60}Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl', 'mno'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=1}Editor_state.selection1 = {line=2, pos=3} - replacement in text_tests.lua at line 1722
check_eq(Lines[1].data, 'abc', "F - test_backspace_to_start_of_line/data:1")check_eq(Lines[2].data, 'f', "F - test_backspace_to_start_of_line/data:2")check_eq(Editor_state.lines[1].data, 'abc', "F - test_backspace_to_start_of_line/data:1")check_eq(Editor_state.lines[2].data, 'f', "F - test_backspace_to_start_of_line/data:2") - replacement in text_tests.lua at line 1725
check_eq(Cursor1.line, 2, "F - test_backspace_to_start_of_line/cursor:line")check_eq(Cursor1.pos, 1, "F - test_backspace_to_start_of_line/cursor:pos")check_eq(Editor_state.cursor1.line, 2, "F - test_backspace_to_start_of_line/cursor:line")check_eq(Editor_state.cursor1.pos, 1, "F - test_backspace_to_start_of_line/cursor:pos") - replacement in text_tests.lua at line 1728
check_nil(Selection1.line, "F - test_backspace_to_start_of_line/selection")check_nil(Editor_state.selection1.line, "F - test_backspace_to_start_of_line/selection") - replacement in text_tests.lua at line 1734[20.40650]→[20.40650:40692](∅→∅),[20.40692]→[20.3266:3313](∅→∅),[20.3313]→[20.40724:40806](∅→∅),[20.40724]→[20.40724:40806](∅→∅)
Lines = load_array{'abc', 'def', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=4}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'def', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=4}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1742
check_eq(Cursor1.line, 2, 'F - test_undo_insert_text/baseline/cursor:line')check_eq(Cursor1.pos, 5, 'F - test_undo_insert_text/baseline/cursor:pos')check_nil(Selection1.line, 'F - test_undo_insert_text/baseline/selection:line')check_nil(Selection1.pos, 'F - test_undo_insert_text/baseline/selection:pos')local y = Margin_topcheck_eq(Editor_state.cursor1.line, 2, 'F - test_undo_insert_text/baseline/cursor:line')check_eq(Editor_state.cursor1.pos, 5, 'F - test_undo_insert_text/baseline/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_undo_insert_text/baseline/selection:line')check_nil(Editor_state.selection1.pos, 'F - test_undo_insert_text/baseline/selection:pos')local y = Editor_state.margin_top - replacement in text_tests.lua at line 1748
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1750
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1754
check_eq(Cursor1.line, 2, 'F - test_undo_insert_text/cursor:line')check_eq(Cursor1.pos, 4, 'F - test_undo_insert_text/cursor:pos')check_nil(Selection1.line, 'F - test_undo_insert_text/selection:line')check_nil(Selection1.pos, 'F - test_undo_insert_text/selection:pos')y = Margin_topcheck_eq(Editor_state.cursor1.line, 2, 'F - test_undo_insert_text/cursor:line')check_eq(Editor_state.cursor1.pos, 4, 'F - test_undo_insert_text/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_undo_insert_text/selection:line')check_nil(Editor_state.selection1.pos, 'F - test_undo_insert_text/selection:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1760
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1762
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1769[20.42173]→[20.42173:42216](∅→∅),[20.42216]→[20.3314:3361](∅→∅),[20.3361]→[20.42248:42330](∅→∅),[20.42248]→[20.42248:42330](∅→∅)
Lines = load_array{'abc', 'defg', 'xyz'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=2, pos=5}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc', 'defg', 'xyz'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=2, pos=5}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1776
check_eq(Cursor1.line, 2, 'F - test_undo_delete_text/baseline/cursor:line')check_eq(Cursor1.pos, 4, 'F - test_undo_delete_text/baseline/cursor:pos')check_nil(Selection1.line, 'F - test_undo_delete_text/baseline/selection:line')check_nil(Selection1.pos, 'F - test_undo_delete_text/baseline/selection:pos')local y = Margin_topcheck_eq(Editor_state.cursor1.line, 2, 'F - test_undo_delete_text/baseline/cursor:line')check_eq(Editor_state.cursor1.pos, 4, 'F - test_undo_delete_text/baseline/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_undo_delete_text/baseline/selection:line')check_nil(Editor_state.selection1.pos, 'F - test_undo_delete_text/baseline/selection:pos')local y = Editor_state.margin_top - replacement in text_tests.lua at line 1782
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1784
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1789
check_eq(Cursor1.line, 2, 'F - test_undo_delete_text/cursor:line')check_eq(Cursor1.pos, 5, 'F - test_undo_delete_text/cursor:pos')check_nil(Selection1.line, 'F - test_undo_delete_text/selection:line')check_nil(Selection1.pos, 'F - test_undo_delete_text/selection:pos')--? check_eq(Selection1.line, 2, 'F - test_undo_delete_text/selection:line')--? check_eq(Selection1.pos, 4, 'F - test_undo_delete_text/selection:pos')y = Margin_topcheck_eq(Editor_state.cursor1.line, 2, 'F - test_undo_delete_text/cursor:line')check_eq(Editor_state.cursor1.pos, 5, 'F - test_undo_delete_text/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_undo_delete_text/selection:line')check_nil(Editor_state.selection1.pos, 'F - test_undo_delete_text/selection:pos')--? check_eq(Editor_state.selection1.line, 2, 'F - test_undo_delete_text/selection:line')--? check_eq(Editor_state.selection1.pos, 4, 'F - test_undo_delete_text/selection:pos')y = Editor_state.margin_top - replacement in text_tests.lua at line 1797
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1799
y = y + Line_heighty = y + Editor_state.line_height - replacement in text_tests.lua at line 1807[20.703]→[20.183:211](∅→∅),[20.183]→[20.183:211](∅→∅),[20.211]→[20.3362:3409](∅→∅),[20.3409]→[20.229:342](∅→∅),[20.229]→[20.229:342](∅→∅)
Lines = load_array{'abc'}Margin_right = 0; Margin_width = Margin_leftCursor1 = {line=1, pos=1}Selection1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Editor_state.lines = load_array{'abc'}Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_leftEditor_state.cursor1 = {line=1, pos=1}Editor_state.selection1 = {line=1, pos=2}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {} - replacement in text_tests.lua at line 1816
check_eq(Lines[1].data, 'xbc', 'F - test_undo_restores_selection/baseline')check_nil(Selection1.line, 'F - test_undo_restores_selection/baseline:selection')check_eq(Editor_state.lines[1].data, 'xbc', 'F - test_undo_restores_selection/baseline')check_nil(Editor_state.selection1.line, 'F - test_undo_restores_selection/baseline:selection') - replacement in text_tests.lua at line 1822
check_eq(Selection1.line, 1, 'F - test_undo_restores_selection/line')check_eq(Selection1.pos, 2, 'F - test_undo_restores_selection/pos')check_eq(Editor_state.selection1.line, 1, 'F - test_undo_restores_selection/line')check_eq(Editor_state.selection1.pos, 2, 'F - test_undo_restores_selection/pos') - replacement in text.lua at line 31
--? print('('..s(x)..','..s(y)..') '..frag..'('..s(frag_width)..' vs '..s(right)..') '..s(line_index)..' vs '..s(Screen_top1.line)..'; '..s(pos)..' vs '..s(Screen_top1.pos)..'; bottom: '..s(Screen_bottom1.line)..'/'..s(Screen_bottom1.pos))--? print('('..s(x)..','..s(y)..') '..frag..'('..s(frag_width)..' vs '..s(right)..') '..s(line_index)..' vs '..s(Editor_state.screen_top1.line)..'; '..s(pos)..' vs '..s(Editor_state.screen_top1.pos)..'; bottom: '..s(Editor_state.screen_bottom1.line)..'/'..s(Editor_state.screen_bottom1.pos)) - replacement in text.lua at line 35
if Text.lt1(Screen_top1, {line=line_index, pos=pos}) theny = y + Line_heightif y + Line_height > App.screen.height thenif Text.lt1(Editor_state.screen_top1, {line=line_index, pos=pos}) theny = y + Editor_state.line_heightif y + Editor_state.line_height > App.screen.height then - replacement in text.lua at line 46
--? print('checking to draw', pos, Screen_top1.pos)--? print('checking to draw', pos, Editor_state.screen_top1.pos) - replacement in text.lua at line 48
if Text.le1(Screen_top1, {line=line_index, pos=pos}) thenif Selection1.line thenif Text.le1(Editor_state.screen_top1, {line=line_index, pos=pos}) thenif Editor_state.selection1.line then - replacement in text.lua at line 57
if line_index == Cursor1.line thenif pos <= Cursor1.pos and pos + frag_len > Cursor1.pos thenif Search_term thenif Lines[Cursor1.line].data:sub(Cursor1.pos, Cursor1.pos+utf8.len(Search_term)-1) == Search_term thenlocal lo_px = Text.draw_highlight(line, x,y, pos, Cursor1.pos, Cursor1.pos+utf8.len(Search_term))if line_index == Editor_state.cursor1.line thenif pos <= Editor_state.cursor1.pos and pos + frag_len > Editor_state.cursor1.pos thenif Editor_state.search_term thenif Editor_state.lines[Editor_state.cursor1.line].data:sub(Editor_state.cursor1.pos, Editor_state.cursor1.pos+utf8.len(Editor_state.search_term)-1) == Editor_state.search_term thenlocal lo_px = Text.draw_highlight(line, x,y, pos, Editor_state.cursor1.pos, Editor_state.cursor1.pos+utf8.len(Editor_state.search_term)) - replacement in text.lua at line 63
love.graphics.print(Search_term, x+lo_px,y)love.graphics.print(Editor_state.search_term, x+lo_px,y) - replacement in text.lua at line 66
Text.draw_cursor(x+Text.x(frag, Cursor1.pos-pos+1), y)Text.draw_cursor(x+Text.x(frag, Editor_state.cursor1.pos-pos+1), y) - replacement in text.lua at line 73
if Search_term == nil thenif line_index == Cursor1.line and Cursor1.pos == pos thenif Editor_state.search_term == nil thenif line_index == Editor_state.cursor1.line and Editor_state.cursor1.pos == pos then - replacement in text.lua at line 87
love.graphics.rectangle('fill', x,y, 3,Line_height)love.graphics.rectangle('fill', x,y, 3,Editor_state.line_height) - replacement in text.lua at line 90
Cursor_x = xCursor_y = y+Line_heightEditor_state.cursor_x = xEditor_state.cursor_y = y+Editor_state.line_height - replacement in text.lua at line 140[20.57]→[20.1234:1274](∅→∅),[9.76]→[20.1234:1274](∅→∅),[20.96]→[20.1234:1274](∅→∅),[20.1234]→[20.1234:1274](∅→∅),[20.1274]→[20.3:118](∅→∅)
local before = snapshot(Cursor1.line)--? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)local before = snapshot(Editor_state.cursor1.line)--? print(Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos) - replacement in text.lua at line 143[20.28]→[20.119:173](∅→∅),[20.173]→[16.64:172](∅→∅),[16.172]→[20.3:88](∅→∅),[20.115]→[20.3:88](∅→∅),[20.88]→[20.273:396](∅→∅),[20.273]→[20.273:396](∅→∅)
if Cursor_y >= App.screen.height - Line_height thenText.populate_screen_line_starting_pos(Lines[Cursor1.line], Margin_left, App.screen.width-Margin_right)Text.snap_cursor_to_bottom_of_screen(Margin_left, App.screen.width-Margin_right)--? print('=>', Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)if Editor_state.cursor_y >= App.screen.height - Editor_state.line_height thenText.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Text.snap_cursor_to_bottom_of_screen(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)--? print('=>', Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos) - replacement in text.lua at line 148
record_undo_event({before=before, after=snapshot(Cursor1.line)})record_undo_event({before=before, after=snapshot(Editor_state.cursor1.line)}) - replacement in text.lua at line 152[20.99]→[20.78:151](∅→∅),[20.151]→[20.147:285](∅→∅),[20.248]→[20.147:285](∅→∅),[20.408]→[20.147:285](∅→∅),[20.318]→[20.147:285](∅→∅),[20.285]→[20.3:43](∅→∅),[20.43]→[20.733:763](∅→∅),[20.1561]→[20.733:763](∅→∅),[20.2105]→[20.733:763](∅→∅),[20.733]→[20.733:763](∅→∅)
local byte_offset = Text.offset(Lines[Cursor1.line].data, Cursor1.pos)Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_offset-1)..t..string.sub(Lines[Cursor1.line].data, byte_offset)Text.clear_cache(Lines[Cursor1.line])Cursor1.pos = Cursor1.pos+1local byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos)Editor_state.lines[Editor_state.cursor1.line].data = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, 1, byte_offset-1)..t..string.sub(Editor_state.lines[Editor_state.cursor1.line].data, byte_offset)Text.clear_cache(Editor_state.lines[Editor_state.cursor1.line])Editor_state.cursor1.pos = Editor_state.cursor1.pos+1 - replacement in text.lua at line 160
--? print('chord', chord, Selection1.line, Selection1.pos)--? print('chord', chord, Editor_state.selection1.line, Editor_state.selection1.pos) - replacement in text.lua at line 163
local before_line = Cursor1.linelocal before_line = Editor_state.cursor1.line - replacement in text.lua at line 166
Selection1 = {}if (Cursor_y + Line_height) > App.screen.height thenText.snap_cursor_to_bottom_of_screen(Margin_left, App.screen.width-Margin_right)Editor_state.selection1 = {}if (Editor_state.cursor_y + Editor_state.line_height) > App.screen.height thenText.snap_cursor_to_bottom_of_screen(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 171
record_undo_event({before=before, after=snapshot(before_line, Cursor1.line)})record_undo_event({before=before, after=snapshot(before_line, Editor_state.cursor1.line)}) - replacement in text.lua at line 173
local before = snapshot(Cursor1.line)--? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)local before = snapshot(Editor_state.cursor1.line)--? print(Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos) - replacement in text.lua at line 176[20.195]→[20.521:577](∅→∅),[20.577]→[16.173:283](∅→∅),[16.283]→[20.177:264](∅→∅),[20.182]→[20.177:264](∅→∅),[20.264]→[20.681:806](∅→∅),[20.681]→[20.681:806](∅→∅)
if Cursor_y >= App.screen.height - Line_height thenText.populate_screen_line_starting_pos(Lines[Cursor1.line], Margin_left, App.screen.width-Margin_right)Text.snap_cursor_to_bottom_of_screen(Margin_left, App.screen.width-Margin_right)--? print('=>', Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)if Editor_state.cursor_y >= App.screen.height - Editor_state.line_height thenText.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Text.snap_cursor_to_bottom_of_screen(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)--? print('=>', Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos) - replacement in text.lua at line 182
record_undo_event({before=before, after=snapshot(Cursor1.line)})record_undo_event({before=before, after=snapshot(Editor_state.cursor1.line)}) - replacement in text.lua at line 184[20.316]→[20.8395:8423](∅→∅),[20.6713]→[20.8395:8423](∅→∅),[20.2081]→[20.8395:8423](∅→∅),[20.8423]→[20.91:163](∅→∅)
if Selection1.line thenText.delete_selection(Margin_left, App.screen.width-Margin_right)if Editor_state.selection1.line thenText.delete_selection(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 190[20.1635]→[20.1902:1930](∅→∅),[20.8474]→[20.1902:1930](∅→∅),[20.2081]→[20.1902:1930](∅→∅),[20.1930]→[20.1636:1674](∅→∅),[20.1773]→[20.1930:2082](∅→∅),[20.1930]→[20.1930:2082](∅→∅)
if Cursor1.pos > 1 thenbefore = snapshot(Cursor1.line)local byte_start = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos-1)local byte_end = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)if Editor_state.cursor1.pos > 1 thenbefore = snapshot(Editor_state.cursor1.line)local byte_start = utf8.offset(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos-1)local byte_end = utf8.offset(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos) - replacement in text.lua at line 196
Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_start-1)..string.sub(Lines[Cursor1.line].data, byte_end)Editor_state.lines[Editor_state.cursor1.line].data = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, 1, byte_start-1)..string.sub(Editor_state.lines[Editor_state.cursor1.line].data, byte_end) - replacement in text.lua at line 198
Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_start-1)Editor_state.lines[Editor_state.cursor1.line].data = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, 1, byte_start-1) - replacement in text.lua at line 200
Cursor1.pos = Cursor1.pos-1Editor_state.cursor1.pos = Editor_state.cursor1.pos-1 - replacement in text.lua at line 202[20.2600]→[20.2396:2429](∅→∅),[20.2429]→[2.3:57](∅→∅),[2.57]→[20.2429:2527](∅→∅),[20.2429]→[20.2429:2527](∅→∅)
elseif Cursor1.line > 1 thenbefore = snapshot(Cursor1.line-1, Cursor1.line)if Lines[Cursor1.line-1].mode == 'drawing' thentable.remove(Lines, Cursor1.line-1)elseif Editor_state.cursor1.line > 1 thenbefore = snapshot(Editor_state.cursor1.line-1, Editor_state.cursor1.line)if Editor_state.lines[Editor_state.cursor1.line-1].mode == 'drawing' thentable.remove(Editor_state.lines, Editor_state.cursor1.line-1) - replacement in text.lua at line 208[20.2761]→[20.2528:2679](∅→∅),[20.124]→[20.2725:2767](∅→∅),[20.139]→[20.2725:2767](∅→∅),[20.2725]→[20.2725:2767](∅→∅)
Cursor1.pos = utf8.len(Lines[Cursor1.line-1].data)+1Lines[Cursor1.line-1].data = Lines[Cursor1.line-1].data..Lines[Cursor1.line].datatable.remove(Lines, Cursor1.line)Editor_state.cursor1.pos = utf8.len(Editor_state.lines[Editor_state.cursor1.line-1].data)+1Editor_state.lines[Editor_state.cursor1.line-1].data = Editor_state.lines[Editor_state.cursor1.line-1].data..Editor_state.lines[Editor_state.cursor1.line].datatable.remove(Editor_state.lines, Editor_state.cursor1.line) - replacement in text.lua at line 212
Cursor1.line = Cursor1.line-1Editor_state.cursor1.line = Editor_state.cursor1.line-1 - replacement in text.lua at line 214[20.2866]→[20.129:172](∅→∅),[20.172]→[15.3:88](∅→∅),[15.88]→[20.3:92](∅→∅),[20.3023]→[20.3:92](∅→∅),[20.92]→[20.3068:3103](∅→∅),[20.3068]→[20.3068:3103](∅→∅)
if Text.lt1(Cursor1, Screen_top1) thenlocal top2 = Text.to2(Screen_top1, Margin_left, App.screen.width-Margin_right)top2 = Text.previous_screen_line(top2, Margin_left, App.screen.width-Margin_right)Screen_top1 = Text.to1(top2)if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) thenlocal top2 = Text.to2(Editor_state.screen_top1, Editor_state.margin_left, App.screen.width-Editor_state.margin_right)top2 = Text.previous_screen_line(top2, Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.screen_top1 = Text.to1(top2) - replacement in text.lua at line 220
Text.clear_cache(Lines[Cursor1.line])assert(Text.le1(Screen_top1, Cursor1))Text.clear_cache(Editor_state.lines[Editor_state.cursor1.line])assert(Text.le1(Editor_state.screen_top1, Editor_state.cursor1)) - replacement in text.lua at line 223
record_undo_event({before=before, after=snapshot(Cursor1.line)})record_undo_event({before=before, after=snapshot(Editor_state.cursor1.line)}) - replacement in text.lua at line 225[20.465]→[20.8475:8503](∅→∅),[20.6931]→[20.8475:8503](∅→∅),[20.3066]→[20.8475:8503](∅→∅),[20.8503]→[20.164:236](∅→∅)
if Selection1.line thenText.delete_selection(Margin_left, App.screen.width-Margin_right)if Editor_state.selection1.line thenText.delete_selection(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 231
if Cursor1.pos <= utf8.len(Lines[Cursor1.line].data) thenbefore = snapshot(Cursor1.line)if Editor_state.cursor1.pos <= utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) thenbefore = snapshot(Editor_state.cursor1.line) - replacement in text.lua at line 234
before = snapshot(Cursor1.line, Cursor1.line+1)before = snapshot(Editor_state.cursor1.line, Editor_state.cursor1.line+1) - replacement in text.lua at line 236
if Cursor1.pos <= utf8.len(Lines[Cursor1.line].data) thenlocal byte_start = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)local byte_end = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos+1)if Editor_state.cursor1.pos <= utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) thenlocal byte_start = utf8.offset(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos)local byte_end = utf8.offset(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos+1) - replacement in text.lua at line 241
Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_start-1)..string.sub(Lines[Cursor1.line].data, byte_end)Editor_state.lines[Editor_state.cursor1.line].data = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, 1, byte_start-1)..string.sub(Editor_state.lines[Editor_state.cursor1.line].data, byte_end) - replacement in text.lua at line 243
Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_start-1)Editor_state.lines[Editor_state.cursor1.line].data = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, 1, byte_start-1) - replacement in text.lua at line 245
-- no change to Cursor1.pos-- no change to Editor_state.cursor1.pos - replacement in text.lua at line 247
elseif Cursor1.line < #Lines thenif Lines[Cursor1.line+1].mode == 'drawing' thentable.remove(Lines, Cursor1.line+1)elseif Editor_state.cursor1.line < #Editor_state.lines thenif Editor_state.lines[Editor_state.cursor1.line+1].mode == 'drawing' thentable.remove(Editor_state.lines, Editor_state.cursor1.line+1) - replacement in text.lua at line 252[20.3776]→[20.3470:3558](∅→∅),[20.233]→[20.3602:3646](∅→∅),[20.244]→[20.3602:3646](∅→∅),[20.3602]→[20.3602:3646](∅→∅)
Lines[Cursor1.line].data = Lines[Cursor1.line].data..Lines[Cursor1.line+1].datatable.remove(Lines, Cursor1.line+1)Editor_state.lines[Editor_state.cursor1.line].data = Editor_state.lines[Editor_state.cursor1.line].data..Editor_state.lines[Editor_state.cursor1.line+1].datatable.remove(Editor_state.lines, Editor_state.cursor1.line+1) - replacement in text.lua at line 256
Text.clear_cache(Lines[Cursor1.line])Text.clear_cache(Editor_state.lines[Editor_state.cursor1.line]) - replacement in text.lua at line 258
record_undo_event({before=before, after=snapshot(Cursor1.line)})record_undo_event({before=before, after=snapshot(Editor_state.cursor1.line)}) - replacement in text.lua at line 261
Text.left(Margin_left, App.screen.width-Margin_right)Selection1 = {}Text.left(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.selection1 = {} - replacement in text.lua at line 264
Text.right(Margin_left, App.screen.width-Margin_right)Selection1 = {}Text.right(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.selection1 = {} - replacement in text.lua at line 267
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 270
Text.left(Margin_left, App.screen.width-Margin_right)Text.left(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 272
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 275
Text.right(Margin_left, App.screen.width-Margin_right)Text.right(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 278
Text.word_left(Margin_left, App.screen.width-Margin_right)Selection1 = {}Text.word_left(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.selection1 = {} - replacement in text.lua at line 281
Text.word_right(Margin_left, App.screen.width-Margin_right)Selection1 = {}Text.word_right(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.selection1 = {} - replacement in text.lua at line 284
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 287
Text.word_left(Margin_left, App.screen.width-Margin_right)Text.word_left(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 289
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 292
Text.word_right(Margin_left, App.screen.width-Margin_right)Text.word_right(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 295
Selection1 = {}Editor_state.selection1 = {} - replacement in text.lua at line 297[20.115]→[20.499:564](∅→∅),[20.564]→[20.24:44](∅→∅),[20.6040]→[20.24:44](∅→∅),[20.1209]→[20.24:44](∅→∅)
Text.end_of_line(Margin_left, App.screen.width-Margin_right)Selection1 = {}Text.end_of_line(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.selection1 = {} - replacement in text.lua at line 300
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 305
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 308
Text.end_of_line(Margin_left, App.screen.width-Margin_right)Text.end_of_line(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 310
Text.up(Margin_left, App.screen.width-Margin_right)Selection1 = {}Text.up(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.selection1 = {} - replacement in text.lua at line 313
Text.down(Margin_left, App.screen.width-Margin_right)Selection1 = {}Text.down(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.selection1 = {} - replacement in text.lua at line 316
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 319
Text.up(Margin_left, App.screen.width-Margin_right)Text.up(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 321
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 324
Text.down(Margin_left, App.screen.width-Margin_right)Text.down(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 326
Text.pageup(Margin_left, App.screen.width-Margin_right)Selection1 = {}Text.pageup(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.selection1 = {} - replacement in text.lua at line 329
Text.pagedown(Margin_left, App.screen.width-Margin_right)Selection1 = {}Text.pagedown(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.selection1 = {} - replacement in text.lua at line 332
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 335
Text.pageup(Margin_left, App.screen.width-Margin_right)Text.pageup(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 337
if Selection1.line == nil thenSelection1 = {line=Cursor1.line, pos=Cursor1.pos}if Editor_state.selection1.line == nil thenEditor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} - replacement in text.lua at line 340
Text.pagedown(Margin_left, App.screen.width-Margin_right)Text.pagedown(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in text.lua at line 345[20.223]→[20.174:247](∅→∅),[20.247]→[20.296:405](∅→∅),[20.1293]→[20.296:405](∅→∅),[20.296]→[20.296:405](∅→∅),[20.3464]→[20.480:564](∅→∅),[20.480]→[20.480:564](∅→∅),[20.564]→[20.234:316](∅→∅),[20.151]→[20.602:652](∅→∅),[20.316]→[20.602:652](∅→∅),[20.602]→[20.602:652](∅→∅)
local byte_offset = Text.offset(Lines[Cursor1.line].data, Cursor1.pos)table.insert(Lines, Cursor1.line+1, {mode='text', data=string.sub(Lines[Cursor1.line].data, byte_offset)})Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_offset-1)Text.clear_cache(Lines[Cursor1.line])Text.clear_cache(Lines[Cursor1.line+1])Cursor1.line = Cursor1.line+1Cursor1.pos = 1local byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos)table.insert(Editor_state.lines, Editor_state.cursor1.line+1, {mode='text', data=string.sub(Editor_state.lines[Editor_state.cursor1.line].data, byte_offset)})Editor_state.lines[Editor_state.cursor1.line].data = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, 1, byte_offset-1)Text.clear_cache(Editor_state.lines[Editor_state.cursor1.line])Text.clear_cache(Editor_state.lines[Editor_state.cursor1.line+1])Editor_state.cursor1.line = Editor_state.cursor1.line+1Editor_state.cursor1.pos = 1 - replacement in text.lua at line 357
local top2 = Text.to2(Screen_top1, left, right)local top2 = Text.to2(Editor_state.screen_top1, left, right) - replacement in text.lua at line 359
local y = App.screen.height - Line_heightwhile y >= Margin_top dolocal y = App.screen.height - Editor_state.line_heightwhile y >= Editor_state.margin_top do - replacement in text.lua at line 362[20.89]→[20.282:402](∅→∅),[20.282]→[20.282:402](∅→∅),[20.402]→[20.3510:3536](∅→∅),[20.3536]→[20.436:494](∅→∅),[20.436]→[20.436:494](∅→∅),[20.494]→[20.87:168](∅→∅)
if Screen_top1.line == 1 and Screen_top1.pos == 1 then break endif Lines[Screen_top1.line].mode == 'text' theny = y - Line_heightelseif Lines[Screen_top1.line].mode == 'drawing' theny = y - Drawing_padding_height - Drawing.pixels(Lines[Screen_top1.line].h)if Editor_state.screen_top1.line == 1 and Editor_state.screen_top1.pos == 1 then break endif Editor_state.lines[Editor_state.screen_top1.line].mode == 'text' theny = y - Editor_state.line_heightelseif Editor_state.lines[Editor_state.screen_top1.line].mode == 'drawing' theny = y - Editor_state.drawing_padding_height - Drawing.pixels(Editor_state.lines[Editor_state.screen_top1.line].h) - replacement in text.lua at line 370
Screen_top1 = Text.to1(top2)Cursor1.line = Screen_top1.lineCursor1.pos = Screen_top1.posEditor_state.screen_top1 = Text.to1(top2)Editor_state.cursor1.line = Editor_state.screen_top1.lineEditor_state.cursor1.pos = Editor_state.screen_top1.pos - replacement in text.lua at line 374
--? print(Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos)--? print(Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_top1.line, Editor_state.screen_top1.pos) - replacement in text.lua at line 383
local top2 = Text.to2(Screen_bottom1, left, right)local top2 = Text.to2(Editor_state.screen_bottom1, left, right) - replacement in text.lua at line 388
if Text.lt1(Screen_top1, new_top1) thenScreen_top1 = new_top1if Text.lt1(Editor_state.screen_top1, new_top1) thenEditor_state.screen_top1 = new_top1 - replacement in text.lua at line 391
Screen_top1.line = Screen_bottom1.lineScreen_top1.pos = Screen_bottom1.posEditor_state.screen_top1.line = Editor_state.screen_bottom1.lineEditor_state.screen_top1.pos = Editor_state.screen_bottom1.pos - replacement in text.lua at line 394
--? print('setting top to', Screen_top1.line, Screen_top1.pos)Cursor1.line = Screen_top1.lineCursor1.pos = Screen_top1.pos--? print('setting top to', Editor_state.screen_top1.line, Editor_state.screen_top1.pos)Editor_state.cursor1.line = Editor_state.screen_top1.lineEditor_state.cursor1.pos = Editor_state.screen_top1.pos - replacement in text.lua at line 398
--? print('top now', Screen_top1.line)--? print('top now', Editor_state.screen_top1.line) - replacement in text.lua at line 404
assert(Lines[Cursor1.line].mode == 'text')--? print('up', Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos)assert(Editor_state.lines[Editor_state.cursor1.line].mode == 'text')--? print('up', Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_top1.line, Editor_state.screen_top1.pos) - replacement in text.lua at line 410
local new_cursor_line = Cursor1.linelocal new_cursor_line = Editor_state.cursor1.line - replacement in text.lua at line 413
if Lines[new_cursor_line].mode == 'text' thenif Editor_state.lines[new_cursor_line].mode == 'text' then - replacement in text.lua at line 415
Cursor1.line = new_cursor_lineText.populate_screen_line_starting_pos(Lines[Cursor1.line], left, right)Editor_state.cursor1.line = new_cursor_lineText.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], left, right) - replacement in text.lua at line 419
local screen_line_starting_pos = Lines[Cursor1.line].screen_line_starting_poslocal screen_line_starting_pos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos - replacement in text.lua at line 423
if Screen_top1.line > Cursor1.line thenScreen_top1.line = Cursor1.lineScreen_top1.pos = screen_line_starting_pos--? print('pos of top of screen is also '..tostring(Screen_top1.pos)..' of the same line')if Editor_state.screen_top1.line > Editor_state.cursor1.line thenEditor_state.screen_top1.line = Editor_state.cursor1.lineEditor_state.screen_top1.pos = screen_line_starting_pos--? print('pos of top of screen is also '..tostring(Editor_state.screen_top1.pos)..' of the same line') - replacement in text.lua at line 428[20.1520]→[20.248:361](∅→∅),[20.361]→[20.165:254](∅→∅),[20.165]→[20.165:254](∅→∅),[20.254]→[14.3:99](∅→∅)
local screen_line_starting_byte_offset = Text.offset(Lines[Cursor1.line].data, screen_line_starting_pos)local s = string.sub(Lines[Cursor1.line].data, screen_line_starting_byte_offset)Cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(s, Cursor_x, left) - 1local screen_line_starting_byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, screen_line_starting_pos)local s = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, screen_line_starting_byte_offset)Editor_state.cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(s, Editor_state.cursor_x, left) - 1 - replacement in text.lua at line 434
if Cursor1.line < Screen_top1.line thenScreen_top1.line = Cursor1.lineif Editor_state.cursor1.line < Editor_state.screen_top1.line thenEditor_state.screen_top1.line = Editor_state.cursor1.line - replacement in text.lua at line 441
new_screen_line_starting_pos = Lines[Cursor1.line].screen_line_starting_pos[screen_line_index-1]new_screen_line_starting_pos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos[screen_line_index-1] - replacement in text.lua at line 443
if Screen_top1.line == Cursor1.line and Screen_top1.pos == screen_line_starting_pos thenScreen_top1.pos = new_screen_line_starting_pos--? print('also setting pos of top of screen to '..tostring(Screen_top1.pos))if Editor_state.screen_top1.line == Editor_state.cursor1.line and Editor_state.screen_top1.pos == screen_line_starting_pos thenEditor_state.screen_top1.pos = new_screen_line_starting_pos--? print('also setting pos of top of screen to '..tostring(Editor_state.screen_top1.pos)) - replacement in text.lua at line 447[20.2441]→[20.362:479](∅→∅),[20.479]→[20.421:510](∅→∅),[20.421]→[20.421:510](∅→∅),[20.510]→[14.100:196](∅→∅),[14.196]→[20.2612:2671](∅→∅),[20.2612]→[20.2612:2671](∅→∅)
local new_screen_line_starting_byte_offset = Text.offset(Lines[Cursor1.line].data, new_screen_line_starting_pos)local s = string.sub(Lines[Cursor1.line].data, new_screen_line_starting_byte_offset)Cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, Cursor_x, left) - 1--? print('cursor pos is now '..tostring(Cursor1.pos))local new_screen_line_starting_byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, new_screen_line_starting_pos)local s = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, new_screen_line_starting_byte_offset)Editor_state.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, Editor_state.cursor_x, left) - 1--? print('cursor pos is now '..tostring(Editor_state.cursor1.pos)) - replacement in text.lua at line 455
assert(Lines[Cursor1.line].mode == 'text')--? print('down', Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos, Screen_bottom1.line, Screen_bottom1.pos)assert(Editor_state.lines[Editor_state.cursor1.line].mode == 'text')--? print('down', Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos) - replacement in text.lua at line 460
local new_cursor_line = Cursor1.linewhile new_cursor_line < #Lines dolocal new_cursor_line = Editor_state.cursor1.linewhile new_cursor_line < #Editor_state.lines do - replacement in text.lua at line 463[20.3138]→[20.3138:3229](∅→∅),[20.3229]→[14.197:285](∅→∅),[14.285]→[20.3311:3342](∅→∅),[20.3311]→[20.3311:3342](∅→∅)
if Lines[new_cursor_line].mode == 'text' thenCursor1.line = new_cursor_lineCursor1.pos = Text.nearest_cursor_pos(Lines[Cursor1.line].data, Cursor_x, left)--? print(Cursor1.pos)if Editor_state.lines[new_cursor_line].mode == 'text' thenEditor_state.cursor1.line = new_cursor_lineEditor_state.cursor1.pos = Text.nearest_cursor_pos(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor_x, left)--? print(Editor_state.cursor1.pos) - replacement in text.lua at line 470
if Cursor1.line > Screen_bottom1.line then--? print('screen top before:', Screen_top1.line, Screen_top1.pos)if Editor_state.cursor1.line > Editor_state.screen_bottom1.line then--? print('screen top before:', Editor_state.screen_top1.line, Editor_state.screen_top1.pos) - replacement in text.lua at line 474
--? print('screen top after:', Screen_top1.line, Screen_top1.pos)--? print('screen top after:', Editor_state.screen_top1.line, Editor_state.screen_top1.pos) - replacement in text.lua at line 479
if Text.le1(Screen_bottom1, Cursor1) thenif Text.le1(Editor_state.screen_bottom1, Editor_state.cursor1) then - replacement in text.lua at line 484
new_screen_line_starting_pos = Lines[Cursor1.line].screen_line_starting_pos[screen_line_index+1]new_screen_line_starting_pos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos[screen_line_index+1] - replacement in text.lua at line 486[20.4338]→[20.480:597](∅→∅),[20.597]→[20.677:766](∅→∅),[20.677]→[20.677:766](∅→∅),[20.766]→[14.286:382](∅→∅),[14.382]→[20.4509:4571](∅→∅),[20.4509]→[20.4509:4571](∅→∅)
local new_screen_line_starting_byte_offset = Text.offset(Lines[Cursor1.line].data, new_screen_line_starting_pos)local s = string.sub(Lines[Cursor1.line].data, new_screen_line_starting_byte_offset)Cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, Cursor_x, left) - 1--? print('cursor pos is now', Cursor1.line, Cursor1.pos)local new_screen_line_starting_byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, new_screen_line_starting_pos)local s = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, new_screen_line_starting_byte_offset)Editor_state.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, Editor_state.cursor_x, left) - 1--? print('cursor pos is now', Editor_state.cursor1.line, Editor_state.cursor1.pos) - replacement in text.lua at line 493
--? print('screen top after:', Screen_top1.line, Screen_top1.pos)--? print('screen top after:', Editor_state.screen_top1.line, Editor_state.screen_top1.pos) - replacement in text.lua at line 496
--? print('=>', Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos, Screen_bottom1.line, Screen_bottom1.pos)--? print('=>', Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos) - replacement in text.lua at line 500
Cursor1.pos = 1if Text.lt1(Cursor1, Screen_top1) thenScreen_top1 = {line=Cursor1.line, pos=Cursor1.pos} -- copyEditor_state.cursor1.pos = 1if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) thenEditor_state.screen_top1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} -- copy - replacement in text.lua at line 507
Cursor1.pos = utf8.len(Lines[Cursor1.line].data) + 1Editor_state.cursor1.pos = utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) + 1 - replacement in text.lua at line 509
local botline1 = {line=Cursor1.line, pos=botpos}local botline1 = {line=Editor_state.cursor1.line, pos=botpos} - replacement in text.lua at line 518
if Cursor1.pos == 1 thenif Editor_state.cursor1.pos == 1 then - replacement in text.lua at line 521
if Text.match(Lines[Cursor1.line].data, Cursor1.pos-1, '%S') thenif Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos-1, '%S') then - replacement in text.lua at line 529
if Cursor1.pos == 1 thenif Editor_state.cursor1.pos == 1 then - replacement in text.lua at line 532
assert(Cursor1.pos > 1)if Text.match(Lines[Cursor1.line].data, Cursor1.pos-1, '%s') thenassert(Editor_state.cursor1.pos > 1)if Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos-1, '%s') then - replacement in text.lua at line 542
if Cursor1.pos > utf8.len(Lines[Cursor1.line].data) thenif Editor_state.cursor1.pos > utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) then - replacement in text.lua at line 545
if Text.match(Lines[Cursor1.line].data, Cursor1.pos, '%S') thenif Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos, '%S') then - replacement in text.lua at line 552
if Cursor1.pos > utf8.len(Lines[Cursor1.line].data) thenif Editor_state.cursor1.pos > utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) then - replacement in text.lua at line 555
if Text.match(Lines[Cursor1.line].data, Cursor1.pos, '%s') thenif Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos, '%s') then - replacement in text.lua at line 574
assert(Lines[Cursor1.line].mode == 'text')if Cursor1.pos > 1 thenCursor1.pos = Cursor1.pos-1assert(Editor_state.lines[Editor_state.cursor1.line].mode == 'text')if Editor_state.cursor1.pos > 1 thenEditor_state.cursor1.pos = Editor_state.cursor1.pos-1 - replacement in text.lua at line 578
local new_cursor_line = Cursor1.linelocal new_cursor_line = Editor_state.cursor1.line - replacement in text.lua at line 581
if Lines[new_cursor_line].mode == 'text' thenCursor1.line = new_cursor_lineCursor1.pos = utf8.len(Lines[Cursor1.line].data) + 1if Editor_state.lines[new_cursor_line].mode == 'text' thenEditor_state.cursor1.line = new_cursor_lineEditor_state.cursor1.pos = utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) + 1 - replacement in text.lua at line 588
if Text.lt1(Cursor1, Screen_top1) thenlocal top2 = Text.to2(Screen_top1, left, right)if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) thenlocal top2 = Text.to2(Editor_state.screen_top1, left, right) - replacement in text.lua at line 591
Screen_top1 = Text.to1(top2)Editor_state.screen_top1 = Text.to1(top2) - replacement in text.lua at line 603
assert(Lines[Cursor1.line].mode == 'text')if Cursor1.pos <= utf8.len(Lines[Cursor1.line].data) thenCursor1.pos = Cursor1.pos+1assert(Editor_state.lines[Editor_state.cursor1.line].mode == 'text')if Editor_state.cursor1.pos <= utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) thenEditor_state.cursor1.pos = Editor_state.cursor1.pos+1 - replacement in text.lua at line 607
local new_cursor_line = Cursor1.linewhile new_cursor_line <= #Lines-1 dolocal new_cursor_line = Editor_state.cursor1.linewhile new_cursor_line <= #Editor_state.lines-1 do - replacement in text.lua at line 610
if Lines[new_cursor_line].mode == 'text' thenCursor1.line = new_cursor_lineCursor1.pos = 1if Editor_state.lines[new_cursor_line].mode == 'text' thenEditor_state.cursor1.line = new_cursor_lineEditor_state.cursor1.pos = 1 - replacement in text.lua at line 620[20.355]→[16.366:441](∅→∅),[20.112]→[20.6316:6475](∅→∅),[20.314]→[20.6316:6475](∅→∅),[16.441]→[20.6316:6475](∅→∅),[20.1465]→[20.6316:6475](∅→∅)
Text.populate_screen_line_starting_pos(Lines[Cursor1.line], left, right)for i=#Lines[Cursor1.line].screen_line_starting_pos,1,-1 dolocal spos = Lines[Cursor1.line].screen_line_starting_pos[i]if spos <= Cursor1.pos thenText.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], left, right)for i=#Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos,1,-1 dolocal spos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos[i]if spos <= Editor_state.cursor1.pos then - replacement in text.lua at line 631[20.115]→[16.442:517](∅→∅),[20.168]→[20.1:69](∅→∅),[20.377]→[20.1:69](∅→∅),[16.517]→[20.1:69](∅→∅),[20.1794]→[20.1:69](∅→∅),[20.69]→[20.1454:1508](∅→∅),[20.63]→[20.1454:1508](∅→∅),[20.1266]→[20.63:115](∅→∅),[20.1508]→[20.63:115](∅→∅),[20.63]→[20.63:115](∅→∅)
Text.populate_screen_line_starting_pos(Lines[Cursor1.line], left, right)local screen_lines = Lines[Cursor1.line].screen_line_starting_pos--? print(screen_lines[#screen_lines], Cursor1.pos)return screen_lines[#screen_lines] <= Cursor1.posText.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], left, right)local screen_lines = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos--? print(screen_lines[#screen_lines], Editor_state.cursor1.pos)return screen_lines[#screen_lines] <= Editor_state.cursor1.pos - replacement in text.lua at line 638[13.282]→[20.1367:1390](∅→∅),[20.87]→[20.1367:1390](∅→∅),[20.712]→[20.6682:6763](∅→∅),[20.1390]→[20.6682:6763](∅→∅),[20.87]→[20.6682:6763](∅→∅)
local y = Margin_topwhile Cursor1.line <= #Lines doif Lines[Cursor1.line].mode == 'text' thenlocal y = Editor_state.margin_topwhile Editor_state.cursor1.line <= #Editor_state.lines doif Editor_state.lines[Editor_state.cursor1.line].mode == 'text' then - replacement in text.lua at line 643[20.186]→[20.1509:1553](∅→∅),[20.1553]→[20.169:244](∅→∅),[20.244]→[20.6764:6800](∅→∅),[20.808]→[20.6764:6800](∅→∅),[20.186]→[20.6764:6800](∅→∅)
--? print('cursor skips', Cursor1.line)y = y + Drawing_padding_height + Drawing.pixels(Lines[Cursor1.line].h)Cursor1.line = Cursor1.line + 1--? print('cursor skips', Editor_state.cursor1.line)y = y + Editor_state.drawing_padding_height + Drawing.pixels(Editor_state.lines[Editor_state.cursor1.line].h)Editor_state.cursor1.line = Editor_state.cursor1.line + 1 - replacement in text.lua at line 648
if Cursor1.line > #Lines thenassert(Cursor1.line == #Lines+1)table.insert(Lines, {mode='text', data=''})if Editor_state.cursor1.line > #Editor_state.lines thenassert(Editor_state.cursor1.line == #Editor_state.lines+1)table.insert(Editor_state.lines, {mode='text', data=''}) - replacement in text.lua at line 652
--? print(y, App.screen.height, App.screen.height-Line_height)if y > App.screen.height - Line_height then--? print(y, App.screen.height, App.screen.height-Editor_state.line_height)if y > App.screen.height - Editor_state.line_height then - replacement in text.lua at line 659
-- should never modify Cursor1-- should never modify Editor_state.cursor1 - replacement in text.lua at line 661
local top2 = Text.to2(Cursor1, left, right)local top2 = Text.to2(Editor_state.cursor1, left, right) - replacement in text.lua at line 663
--? print('cursor pos '..tostring(Cursor1.pos)..' is on the #'..tostring(top2.screen_line)..' screen line down')local y = App.screen.height - Line_height--? print('cursor pos '..tostring(Editor_state.cursor1.pos)..' is on the #'..tostring(top2.screen_line)..' screen line down')local y = App.screen.height - Editor_state.line_height - replacement in text.lua at line 669
if top2.screen_line > 1 or Lines[top2.line-1].mode == 'text' thenlocal h = Line_heightif y - h < Margin_top thenif top2.screen_line > 1 or Editor_state.lines[top2.line-1].mode == 'text' thenlocal h = Editor_state.line_heightif y - h < Editor_state.margin_top then - replacement in text.lua at line 677
assert(Lines[top2.line-1].mode == 'drawing')assert(Editor_state.lines[top2.line-1].mode == 'drawing') - replacement in text.lua at line 680
local h = Drawing_padding_height + Drawing.pixels(Lines[top2.line-1].h)if y - h < Margin_top thenlocal h = Editor_state.drawing_padding_height + Drawing.pixels(Editor_state.lines[top2.line-1].h)if y - h < Editor_state.margin_top then - replacement in text.lua at line 690
Screen_top1 = Text.to1(top2)--? print('top1 finally:', Screen_top1.line, Screen_top1.pos)Editor_state.screen_top1 = Text.to1(top2)--? print('top1 finally:', Editor_state.screen_top1.line, Editor_state.screen_top1.pos) - replacement in text.lua at line 700
return y < line.starty + Line_height*(#line.screen_line_starting_pos - Text.screen_line_index(line, line.startpos) + 1)return y < line.starty + Editor_state.line_height*(#line.screen_line_starting_pos - Text.screen_line_index(line, line.startpos) + 1) - replacement in text.lua at line 716
local nexty = y + Line_heightlocal nexty = y + Editor_state.line_height - replacement in text.lua at line 741
-- Cursor1.pos = 4 + 2 - 1 = 5-- Editor_state.cursor1.pos = 4 + 2 - 1 = 5 - replacement in text.lua at line 746
-- Cursor1.pos = 7 + 2 - 1 = 8-- Editor_state.cursor1.pos = 7 + 2 - 1 = 8 - replacement in text.lua at line 851
if Lines[pos1.line].mode == 'drawing' thenif Editor_state.lines[pos1.line].mode == 'drawing' then - replacement in text.lua at line 855[20.7808]→[16.579:651](∅→∅),[20.277]→[20.231:352](∅→∅),[20.485]→[20.231:352](∅→∅),[16.651]→[20.231:352](∅→∅),[20.231]→[20.231:352](∅→∅)
Text.populate_screen_line_starting_pos(Lines[pos1.line], left, right)for i=#Lines[pos1.line].screen_line_starting_pos,1,-1 dolocal spos = Lines[pos1.line].screen_line_starting_pos[i]Text.populate_screen_line_starting_pos(Editor_state.lines[pos1.line], left, right)for i=#Editor_state.lines[pos1.line].screen_line_starting_pos,1,-1 dolocal spos = Editor_state.lines[pos1.line].screen_line_starting_pos[i] - replacement in text.lua at line 871
result.pos = Lines[pos2.line].screen_line_starting_pos[pos2.screen_line] + pos2.screen_pos - 1result.pos = Editor_state.lines[pos2.line].screen_line_starting_pos[pos2.screen_line] + pos2.screen_pos - 1 - replacement in text.lua at line 904
print(Cursor1.line, Cursor1.pos, #Lines[Cursor1.line].data, Lines[Cursor1.line].data)print(Editor_state.cursor1.line, Editor_state.cursor1.pos, #Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.lines[Editor_state.cursor1.line].data) - replacement in text.lua at line 916
elseif Lines[pos2.line-1].mode == 'drawing' thenelseif Editor_state.lines[pos2.line-1].mode == 'drawing' then - replacement in text.lua at line 919[20.1699]→[20.1699:1732](∅→∅),[20.1732]→[16.652:728](∅→∅),[20.334]→[20.528:630](∅→∅),[20.549]→[20.528:630](∅→∅),[16.728]→[20.528:630](∅→∅),[20.1960]→[20.528:630](∅→∅)
local l = Lines[pos2.line-1]Text.populate_screen_line_starting_pos(Lines[pos2.line-1], left, right)return {line=pos2.line-1, screen_line=#Lines[pos2.line-1].screen_line_starting_pos, screen_pos=1}local l = Editor_state.lines[pos2.line-1]Text.populate_screen_line_starting_pos(Editor_state.lines[pos2.line-1], left, right)return {line=pos2.line-1, screen_line=#Editor_state.lines[pos2.line-1].screen_line_starting_pos, screen_pos=1} - replacement in text.lua at line 951
--? print('a', Selection1.line)if Screen_top1.pos == 1 then return endlocal line = Lines[Screen_top1.line]--? print('a', Editor_state.selection1.line)if Editor_state.screen_top1.pos == 1 then return endlocal line = Editor_state.lines[Editor_state.screen_top1.line] - replacement in text.lua at line 957
if pos == Screen_top1.pos thenif pos == Editor_state.screen_top1.pos then - replacement in text.lua at line 960
if pos > Screen_top1.pos thenif pos > Editor_state.screen_top1.pos then - replacement in text.lua at line 963
if Screen_top1.pos - prev < pos - Screen_top1.pos thenScreen_top1.pos = previf Editor_state.screen_top1.pos - prev < pos - Editor_state.screen_top1.pos thenEditor_state.screen_top1.pos = prev - replacement in text.lua at line 966
Screen_top1.pos = posEditor_state.screen_top1.pos = pos - replacement in text.lua at line 972
if Text.lt1(Cursor1, Screen_top1) thenCursor1 = {line=Screen_top1.line, pos=Screen_top1.pos}elseif Cursor1.line >= Screen_bottom1.line thenif Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) thenEditor_state.cursor1 = {line=Editor_state.screen_top1.line, pos=Editor_state.screen_top1.pos}elseif Editor_state.cursor1.line >= Editor_state.screen_bottom1.line then - replacement in text.lua at line 978
local line = Lines[Screen_bottom1.line]Cursor1 = {line=Screen_bottom1.line,local line = Editor_state.lines[Editor_state.screen_bottom1.line]Editor_state.cursor1 = {line=Editor_state.screen_bottom1.line, - replacement in text.lua at line 990
return Cursor_y >= App.screen.height - Line_heightreturn Editor_state.cursor_y >= App.screen.height - Editor_state.line_height - replacement in text.lua at line 994
--? local botline1 = {line=Cursor1.line, pos=botpos}--? return Text.lt1(Screen_bottom1, botline1)--? local botline1 = {line=Editor_state.cursor1.line, pos=botpos}--? return Text.lt1(Editor_state.screen_bottom1, botline1) - replacement in text.lua at line 1000[20.37]→[20.4025:4058](∅→∅),[20.280]→[20.4025:4058](∅→∅),[20.304]→[20.4025:4058](∅→∅),[20.732]→[20.4025:4058](∅→∅),[20.4025]→[20.4025:4058](∅→∅)
for _,line in ipairs(Lines) dofor _,line in ipairs(Editor_state.lines) do - replacement in select.lua at line 3
-- Return any intersection of the region from Selection1 to Cursor1 (or-- Return any intersection of the region from Editor_state.selection1 to Editor_state.cursor1 (or - replacement in select.lua at line 7
-- apos must be less than bpos. However Selection1 and Cursor1 can be in any order.-- apos must be less than bpos. However Editor_state.selection1 and Editor_state.cursor1 can be in any order. - replacement in select.lua at line 10
if Selection1.line == nil then return nil,nil end-- min,max = sorted(Selection1,Cursor1)local minl,minp = Selection1.line,Selection1.posif Editor_state.selection1.line == nil then return nil,nil end-- min,max = sorted(Editor_state.selection1,Editor_state.cursor1)local minl,minp = Editor_state.selection1.line,Editor_state.selection1.pos - replacement in select.lua at line 17
maxl,maxp = Cursor1.line,Cursor1.posmaxl,maxp = Editor_state.cursor1.line,Editor_state.cursor1.pos - replacement in select.lua at line 72
love.graphics.rectangle('fill', x+lo_px,y, text_width,Line_height)love.graphics.rectangle('fill', x+lo_px,y, text_width,Editor_state.line_height) - replacement in select.lua at line 81
if Recent_mouse.time and Recent_mouse.time > time-0.1 thenreturn Recent_mouse.line, Recent_mouse.posif Editor_state.recent_mouse.time and Editor_state.recent_mouse.time > time-0.1 thenreturn Editor_state.recent_mouse.line, Editor_state.recent_mouse.pos - replacement in select.lua at line 84
Recent_mouse.time = timeEditor_state.recent_mouse.time = time - replacement in select.lua at line 87
Recent_mouse.line = lineRecent_mouse.pos = posEditor_state.recent_mouse.line = lineEditor_state.recent_mouse.pos = pos - replacement in select.lua at line 90
return Recent_mouse.line, Recent_mouse.posreturn Editor_state.recent_mouse.line, Editor_state.recent_mouse.pos - replacement in select.lua at line 94
for line_index,line in ipairs(Lines) dofor line_index,line in ipairs(Editor_state.lines) do - replacement in select.lua at line 104
if Selection1.line == nil then return endif Editor_state.selection1.line == nil then return end - replacement in select.lua at line 111[20.628]→[20.50:94](∅→∅),[20.46533]→[20.50:94](∅→∅),[20.94]→[20.46533:46591](∅→∅),[20.46533]→[20.46533:46591](∅→∅)
if Selection1.line == nil then return endlocal minl,maxl = minmax(Selection1.line, Cursor1.line)if Editor_state.selection1.line == nil then return endlocal minl,maxl = minmax(Editor_state.selection1.line, Editor_state.cursor1.line) - replacement in select.lua at line 115
record_undo_event({before=before, after=snapshot(Cursor1.line)})record_undo_event({before=before, after=snapshot(Editor_state.cursor1.line)}) - replacement in select.lua at line 119
if Selection1.line == nil then return end-- min,max = sorted(Selection1,Cursor1)local minl,minp = Selection1.line,Selection1.poslocal maxl,maxp = Cursor1.line,Cursor1.posif Editor_state.selection1.line == nil then return end-- min,max = sorted(Editor_state.selection1,Editor_state.cursor1)local minl,minp = Editor_state.selection1.line,Editor_state.selection1.poslocal maxl,maxp = Editor_state.cursor1.line,Editor_state.cursor1.pos - replacement in select.lua at line 131
-- update Cursor1 and Selection1Cursor1.line = minlCursor1.pos = minpif Text.lt1(Cursor1, Screen_top1) thenScreen_top1.line = Cursor1.line_,Screen_top1.pos = Text.pos_at_start_of_cursor_screen_line(left, right)-- update Editor_state.cursor1 and Editor_state.selection1Editor_state.cursor1.line = minlEditor_state.cursor1.pos = minpif Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) thenEditor_state.screen_top1.line = Editor_state.cursor1.line_,Editor_state.screen_top1.pos = Text.pos_at_start_of_cursor_screen_line(left, right) - replacement in select.lua at line 138
Selection1 = {}Editor_state.selection1 = {} - replacement in select.lua at line 140
Text.clear_cache(Lines[minl])local min_offset = Text.offset(Lines[minl].data, minp)local max_offset = Text.offset(Lines[maxl].data, maxp)Text.clear_cache(Editor_state.lines[minl])local min_offset = Text.offset(Editor_state.lines[minl].data, minp)local max_offset = Text.offset(Editor_state.lines[maxl].data, maxp) - replacement in select.lua at line 145
Lines[minl].data = Lines[minl].data:sub(1, min_offset-1)..Lines[minl].data:sub(max_offset)Editor_state.lines[minl].data = Editor_state.lines[minl].data:sub(1, min_offset-1)..Editor_state.lines[minl].data:sub(max_offset) - replacement in select.lua at line 149
local rhs = Lines[maxl].data:sub(max_offset)local rhs = Editor_state.lines[maxl].data:sub(max_offset) - replacement in select.lua at line 151
table.remove(Lines, i)table.remove(Editor_state.lines, i) - replacement in select.lua at line 153
Lines[minl].data = Lines[minl].data:sub(1, min_offset-1)..rhsEditor_state.lines[minl].data = Editor_state.lines[minl].data:sub(1, min_offset-1)..rhs - replacement in select.lua at line 157
if Selection1.line == nil then return end-- min,max = sorted(Selection1,Cursor1)local minl,minp = Selection1.line,Selection1.poslocal maxl,maxp = Cursor1.line,Cursor1.posif Editor_state.selection1.line == nil then return end-- min,max = sorted(Editor_state.selection1,Editor_state.cursor1)local minl,minp = Editor_state.selection1.line,Editor_state.selection1.poslocal maxl,maxp = Editor_state.cursor1.line,Editor_state.cursor1.pos - replacement in select.lua at line 169
local min_offset = Text.offset(Lines[minl].data, minp)local max_offset = Text.offset(Lines[maxl].data, maxp)local min_offset = Text.offset(Editor_state.lines[minl].data, minp)local max_offset = Text.offset(Editor_state.lines[maxl].data, maxp) - replacement in select.lua at line 172
return Lines[minl].data:sub(min_offset, max_offset-1)return Editor_state.lines[minl].data:sub(min_offset, max_offset-1) - replacement in select.lua at line 175
local result = {Lines[minl].data:sub(min_offset)}local result = {Editor_state.lines[minl].data:sub(min_offset)} - replacement in select.lua at line 177
if Lines[i].mode == 'text' thentable.insert(result, Lines[i].data)if Editor_state.lines[i].mode == 'text' thentable.insert(result, Editor_state.lines[i].data) - replacement in select.lua at line 181
table.insert(result, Lines[maxl].data:sub(1, max_offset-1))table.insert(result, Editor_state.lines[maxl].data:sub(1, max_offset-1)) - replacement in search.lua at line 4
local h = Line_height+2local h = Editor_state.line_height+2 - replacement in search.lua at line 15
App.screen.print(Search_term, 25,y-5)App.screen.print(Editor_state.search_term, 25,y-5) - replacement in search.lua at line 17
if Search_text == nil thenSearch_text = App.newText(love.graphics.getFont(), Search_term)if Editor_state.search_text == nil thenEditor_state.search_text = App.newText(love.graphics.getFont(), Editor_state.search_term) - replacement in search.lua at line 20
love.graphics.circle('fill', 25+App.width(Search_text),y-5+h, 2)love.graphics.circle('fill', 25+App.width(Editor_state.search_text),y-5+h, 2) - replacement in search.lua at line 26
local pos = Lines[Cursor1.line].data:find(Search_term, Cursor1.pos)local pos = Editor_state.lines[Editor_state.cursor1.line].data:find(Editor_state.search_term, Editor_state.cursor1.pos) - replacement in search.lua at line 28
Cursor1.pos = posEditor_state.cursor1.pos = pos - replacement in search.lua at line 31
for i=Cursor1.line+1,#Lines dopos = Lines[i].data:find(Search_term)for i=Editor_state.cursor1.line+1,#Editor_state.lines dopos = Editor_state.lines[i].data:find(Editor_state.search_term) - replacement in search.lua at line 34
Cursor1.line = iCursor1.pos = posEditor_state.cursor1.line = iEditor_state.cursor1.pos = pos - replacement in search.lua at line 42
for i=1,Cursor1.line-1 dopos = Lines[i].data:find(Search_term)for i=1,Editor_state.cursor1.line-1 dopos = Editor_state.lines[i].data:find(Editor_state.search_term) - replacement in search.lua at line 45
Cursor1.line = iCursor1.pos = posEditor_state.cursor1.line = iEditor_state.cursor1.pos = pos - replacement in search.lua at line 52
Cursor1.line = Search_backup.cursor.lineCursor1.pos = Search_backup.cursor.posScreen_top1.line = Search_backup.screen_top.lineScreen_top1.pos = Search_backup.screen_top.posEditor_state.cursor1.line = Editor_state.search_backup.cursor.lineEditor_state.cursor1.pos = Editor_state.search_backup.cursor.posEditor_state.screen_top1.line = Editor_state.search_backup.screen_top.lineEditor_state.screen_top1.pos = Editor_state.search_backup.screen_top.pos - replacement in search.lua at line 57[20.50515]→[20.50515:50629](∅→∅),[20.50629]→[20.514:617](∅→∅),[20.617]→[20.50690:50716](∅→∅),[20.50690]→[20.50690:50716](∅→∅)
if Text.lt1(Cursor1, Screen_top1) or Text.lt1(Screen_bottom1, Cursor1) thenScreen_top1.line = Cursor1.linelocal _, pos = Text.pos_at_start_of_cursor_screen_line(Margin_left, App.screen.width-Margin_right)Screen_top1.pos = posif Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) or Text.lt1(Editor_state.screen_bottom1, Editor_state.cursor1) thenEditor_state.screen_top1.line = Editor_state.cursor1.linelocal _, pos = Text.pos_at_start_of_cursor_screen_line(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.screen_top1.pos = pos - replacement in search.lua at line 66
local pos = rfind(Lines[Cursor1.line].data, Search_term, Cursor1.pos)local pos = rfind(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.search_term, Editor_state.cursor1.pos) - replacement in search.lua at line 68
Cursor1.pos = posEditor_state.cursor1.pos = pos - replacement in search.lua at line 71
for i=Cursor1.line-1,1,-1 dopos = rfind(Lines[i].data, Search_term)for i=Editor_state.cursor1.line-1,1,-1 dopos = rfind(Editor_state.lines[i].data, Editor_state.search_term) - replacement in search.lua at line 74
Cursor1.line = iCursor1.pos = posEditor_state.cursor1.line = iEditor_state.cursor1.pos = pos - replacement in search.lua at line 82
for i=#Lines,Cursor1.line+1,-1 dopos = rfind(Lines[i].data, Search_term)for i=#Editor_state.lines,Editor_state.cursor1.line+1,-1 dopos = rfind(Editor_state.lines[i].data, Editor_state.search_term) - replacement in search.lua at line 85
Cursor1.line = iCursor1.pos = posEditor_state.cursor1.line = iEditor_state.cursor1.pos = pos - replacement in search.lua at line 92
Cursor1.line = Search_backup.cursor.lineCursor1.pos = Search_backup.cursor.posScreen_top1.line = Search_backup.screen_top.lineScreen_top1.pos = Search_backup.screen_top.posEditor_state.cursor1.line = Editor_state.search_backup.cursor.lineEditor_state.cursor1.pos = Editor_state.search_backup.cursor.posEditor_state.screen_top1.line = Editor_state.search_backup.screen_top.lineEditor_state.screen_top1.pos = Editor_state.search_backup.screen_top.pos - replacement in search.lua at line 97[20.51555]→[20.51555:51669](∅→∅),[20.51669]→[20.618:721](∅→∅),[20.721]→[20.51730:51756](∅→∅),[20.51730]→[20.51730:51756](∅→∅)
if Text.lt1(Cursor1, Screen_top1) or Text.lt1(Screen_bottom1, Cursor1) thenScreen_top1.line = Cursor1.linelocal _, pos = Text.pos_at_start_of_cursor_screen_line(Margin_left, App.screen.width-Margin_right)Screen_top1.pos = posif Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) or Text.lt1(Editor_state.screen_bottom1, Editor_state.cursor1) thenEditor_state.screen_top1.line = Editor_state.cursor1.linelocal _, pos = Text.pos_at_start_of_cursor_screen_line(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Editor_state.screen_top1.pos = pos - replacement in main_tests.lua at line 3
Filename = 'foo'App.screen.init{width=Margin_left+300, height=300}check_eq(App.screen.width, Margin_left+300, 'F - test_resize_window/baseline/width')Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_left+300, height=300}check_eq(App.screen.width, Editor_state.margin_left+300, 'F - test_resize_window/baseline/width') - replacement in main_tests.lua at line 15
App.screen.init{width=Margin_left+300, height=300}App.screen.init{width=Editor_state.margin_left+300, height=300} - replacement in main_tests.lua at line 34
check_eq(#Lines, 3, 'F - test_drop_file/#lines')check_eq(Lines[1].data, 'abc', 'F - test_drop_file/lines:1')check_eq(Lines[2].data, 'def', 'F - test_drop_file/lines:2')check_eq(Lines[3].data, 'ghi', 'F - test_drop_file/lines:3')check_eq(#Editor_state.lines, 3, 'F - test_drop_file/#lines')check_eq(Editor_state.lines[1].data, 'abc', 'F - test_drop_file/lines:1')check_eq(Editor_state.lines[2].data, 'def', 'F - test_drop_file/lines:2')check_eq(Editor_state.lines[3].data, 'ghi', 'F - test_drop_file/lines:3') - replacement in main_tests.lua at line 42
App.screen.init{width=Margin_left+300, height=300}App.screen.init{width=Editor_state.margin_left+300, height=300} - replacement in main_tests.lua at line 44
Lines = load_array{'abc', 'def'}Filename = 'foo'Editor_state.lines = load_array{'abc', 'def'}Editor_state.filename = 'foo' - replacement in main.lua at line 17
edit.initialize_globals()Editor_state = edit.initialize_state() - replacement in main.lua at line 40
Filename = arg[1]Lines = load_from_disk(Filename)Screen_top1 = {line=1, pos=1}Cursor1 = {line=1, pos=1}for i,line in ipairs(Lines) doEditor_state.filename = arg[1]Editor_state.lines = load_from_disk(Editor_state.filename)Editor_state.screen_top1 = {line=1, pos=1}Editor_state.cursor1 = {line=1, pos=1}for i,line in ipairs(Editor_state.lines) do - replacement in main.lua at line 46
Cursor1.line = iEditor_state.cursor1.line = i - replacement in main.lua at line 51[20.383]→[20.383:420](∅→∅),[20.420]→[12.8:80](∅→∅),[12.80]→[20.467:504](∅→∅),[20.467]→[20.467:504](∅→∅)
Lines = load_from_disk(Filename)if Cursor1.line > #Lines or Lines[Cursor1.line].mode ~= 'text' thenfor i,line in ipairs(Lines) doEditor_state.lines = load_from_disk(Editor_state.filename)if Editor_state.cursor1.line > #Editor_state.lines or Editor_state.lines[Editor_state.cursor1.line].mode ~= 'text' thenfor i,line in ipairs(Editor_state.lines) do - replacement in main.lua at line 55
Cursor1.line = iEditor_state.cursor1.line = i - replacement in main.lua at line 61
love.window.setTitle('lines.love - '..Filename)love.window.setTitle('lines.love - '..Editor_state.filename) - replacement in main.lua at line 86
Filename = settings.filenameEditor_state.filename = settings.filename - replacement in main.lua at line 88
Screen_top1 = settings.screen_topCursor1 = settings.cursorEditor_state.screen_top1 = settings.screen_topEditor_state.cursor1 = settings.cursor - replacement in main.lua at line 102
App.screen.width = 40*App.width(Em)App.screen.width = 40*App.width(Editor_state.em) - replacement in main.lua at line 114
Selection1 = {} -- no support for shift drag while we're resizingText.tweak_screen_top_and_cursor(Margin_left, App.screen.height-Margin_right)Editor_state.selection1 = {} -- no support for shift drag while we're resizingText.tweak_screen_top_and_cursor(Editor_state.margin_left, App.screen.height-Editor_state.margin_right) - replacement in main.lua at line 120
Font_height = font_heightlove.graphics.setFont(love.graphics.newFont(Font_height))Line_height = math.floor(font_height*1.3)Editor_state.font_height = font_heightlove.graphics.setFont(love.graphics.newFont(Editor_state.font_height))Editor_state.line_height = math.floor(font_height*1.3) - replacement in main.lua at line 124
Em = App.newText(love.graphics.getFont(), 'm')Editor_state.em = App.newText(love.graphics.getFont(), 'm') - replacement in main.lua at line 129
if Next_save thensave_to_disk(Lines, Filename)if Editor_state.next_save thensave_to_disk(Editor_state.lines, Editor_state.filename) - replacement in main.lua at line 134
Filename = file:getFilename()Editor_state.filename = file:getFilename() - replacement in main.lua at line 136
Lines = load_from_file(file)Editor_state.lines = load_from_file(file) - replacement in main.lua at line 138
for i,line in ipairs(Lines) dofor i,line in ipairs(Editor_state.lines) do - replacement in main.lua at line 140
Cursor1.line = iEditor_state.cursor1.line = i - replacement in main.lua at line 144
love.window.setTitle('Text with Lines - '..Filename)love.window.setTitle('Text with Editor_state.lines - '..Editor_state.filename) - replacement in main.lua at line 169
local filename = Filenamelocal filename = Editor_state.filename - replacement in main.lua at line 176
font_height=Font_height,font_height=Editor_state.font_height, - replacement in main.lua at line 178
screen_top=Screen_top1, cursor=Cursor1}screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1} - replacement in help.lua at line 4[20.6732]→[20.11:73](∅→∅),[20.73]→[20.4874:4896](∅→∅),[20.4874]→[20.4874:4896](∅→∅),[20.4896]→[20.74:179](∅→∅),[20.179]→[20.4992:5014](∅→∅),[20.4992]→[20.4992:5014](∅→∅),[20.5014]→[20.180:296](∅→∅),[20.119]→[20.5106:5128](∅→∅),[20.296]→[20.5106:5128](∅→∅),[20.5106]→[20.5106:5128](∅→∅),[20.5128]→[20.297:395](∅→∅),[20.395]→[20.5322:5344](∅→∅),[20.5322]→[20.5322:5344](∅→∅),[20.5344]→[20.396:510](∅→∅),[20.117]→[20.5423:5445](∅→∅),[20.510]→[20.5423:5445](∅→∅),[20.5423]→[20.5423:5445](∅→∅),[20.5445]→[20.511:614](∅→∅),[20.614]→[20.5539:5561](∅→∅),[20.5539]→[20.5539:5561](∅→∅),[20.497]→[20.7296:7341](∅→∅),[20.5583]→[20.7296:7341](∅→∅),[20.7296]→[20.7296:7341](∅→∅),[20.7341]→[20.615:715](∅→∅),[20.100]→[20.5675:5699](∅→∅),[20.715]→[20.5675:5699](∅→∅),[20.5675]→[20.5675:5699](∅→∅)
love.graphics.print("Things you can do:", Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Press the mouse button to start drawing a "..current_shape(), Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Hover on a point and press 'ctrl+u' to pick it up and start moving it,", Margin_left+30,y)y = y + Line_heightlove.graphics.print("then press the mouse button to drop it", Margin_left+30+bullet_indent(),y)y = y + Line_heightlove.graphics.print("* Hover on a point and press 'ctrl+n', type a name, then press 'enter'", Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Hover on a point or shape and press 'ctrl+d' to delete it", Margin_left+30,y)y = y + Line_heightif Current_drawing_mode ~= 'freehand' thenlove.graphics.print("* Press 'ctrl+p' to switch to drawing freehand strokes", Margin_left+30,y)y = y + Line_heightlove.graphics.print("Things you can do:", Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print("* Press the mouse button to start drawing a "..current_shape(), Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print("* Hover on a point and press 'ctrl+u' to pick it up and start moving it,", Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print("then press the mouse button to drop it", Editor_state.margin_left+30+bullet_indent(),y)y = y + Editor_state.line_heightlove.graphics.print("* Hover on a point and press 'ctrl+n', type a name, then press 'enter'", Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print("* Hover on a point or shape and press 'ctrl+d' to delete it", Editor_state.margin_left+30,y)y = y + Editor_state.line_heightif Editor_state.current_drawing_mode ~= 'freehand' thenlove.graphics.print("* Press 'ctrl+p' to switch to drawing freehand strokes", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 20[20.7465]→[20.7465:7506](∅→∅),[20.7506]→[20.716:805](∅→∅),[20.805]→[20.5780:5804](∅→∅),[20.5780]→[20.5780:5804](∅→∅)
if Current_drawing_mode ~= 'line' thenlove.graphics.print("* Press 'ctrl+l' to switch to drawing lines", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'line' thenlove.graphics.print("* Press 'ctrl+l' to switch to drawing lines", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 24[20.7619]→[20.7619:7665](∅→∅),[20.7665]→[20.806:915](∅→∅),[20.915]→[20.5905:5929](∅→∅),[20.5905]→[20.5905:5929](∅→∅)
if Current_drawing_mode ~= 'manhattan' thenlove.graphics.print("* Press 'ctrl+m' to switch to drawing horizontal/vertical lines", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'manhattan' thenlove.graphics.print("* Press 'ctrl+m' to switch to drawing horizontal/vertical lines", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 28[20.7798]→[20.7798:7841](∅→∅),[20.7841]→[20.916:1012](∅→∅),[20.99]→[20.6017:6041](∅→∅),[20.1012]→[20.6017:6041](∅→∅),[20.6017]→[20.6017:6041](∅→∅)
if Current_drawing_mode ~= 'circle' thenlove.graphics.print("* Press 'ctrl+o' to switch to drawing circles/arcs", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'circle' thenlove.graphics.print("* Press 'ctrl+o' to switch to drawing circles/arcs", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 32[20.7961]→[20.7961:8005](∅→∅),[20.8005]→[20.1013:1105](∅→∅),[20.1105]→[20.6125:6149](∅→∅),[20.6125]→[20.6125:6149](∅→∅)
if Current_drawing_mode ~= 'polygon' thenlove.graphics.print("* Press 'ctrl+g' to switch to drawing polygons", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'polygon' thenlove.graphics.print("* Press 'ctrl+g' to switch to drawing polygons", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 36[20.428]→[20.428:474](∅→∅),[20.474]→[20.1106:1200](∅→∅),[20.1200]→[20.6235:6259](∅→∅),[20.6235]→[20.6235:6259](∅→∅)
if Current_drawing_mode ~= 'rectangle' thenlove.graphics.print("* Press 'ctrl+r' to switch to drawing rectangles", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'rectangle' thenlove.graphics.print("* Press 'ctrl+r' to switch to drawing rectangles", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 40[20.592]→[20.592:635](∅→∅),[20.635]→[20.1201:1292](∅→∅),[20.1292]→[20.6342:6366](∅→∅),[20.6342]→[20.6342:6366](∅→∅)
if Current_drawing_mode ~= 'square' thenlove.graphics.print("* Press 'ctrl+s' to switch to drawing squares", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'square' thenlove.graphics.print("* Press 'ctrl+s' to switch to drawing squares", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 44[20.8121]→[20.1293:1405](∅→∅),[20.221]→[20.6557:6579](∅→∅),[20.1405]→[20.6557:6579](∅→∅),[20.6557]→[20.6557:6579](∅→∅),[20.6579]→[20.1406:1486](∅→∅),[20.293]→[20.6648:6670](∅→∅),[20.1486]→[20.6648:6670](∅→∅),[20.6648]→[20.6648:6670](∅→∅)
love.graphics.print("* Press 'ctrl+=' or 'ctrl+-' to zoom in or out, ctrl+0 to reset zoom", Margin_left+30,y)y = y + Line_heightlove.graphics.print("Press 'esc' now to hide this message", Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Press 'ctrl+=' or 'ctrl+-' to zoom in or out, ctrl+0 to reset zoom", Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print("Press 'esc' now to hide this message", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 49
love.graphics.rectangle('fill', Margin_left,drawing.y, App.screen.width-Margin_width, math.max(Drawing.pixels(drawing.h),y-drawing.y))love.graphics.rectangle('fill', Editor_state.margin_left,drawing.y, App.screen.width-Editor_state.margin_width, math.max(Drawing.pixels(drawing.h),y-drawing.y)) - replacement in help.lua at line 55[20.8689]→[20.1606:1709](∅→∅),[20.1709]→[20.6765:6787](∅→∅),[20.6765]→[20.6765:6787](∅→∅),[20.6787]→[20.1710:1776](∅→∅),[20.1776]→[20.6844:6866](∅→∅),[20.6844]→[20.6844:6866](∅→∅),[20.913]→[20.8890:8935](∅→∅),[20.6866]→[20.8890:8935](∅→∅),[20.8890]→[20.8890:8935](∅→∅),[20.8935]→[20.1777:1878](∅→∅),[20.1878]→[20.6959:6983](∅→∅),[20.6959]→[20.6959:6983](∅→∅),[20.946]→[20.9054:9138](∅→∅),[20.6983]→[20.9054:9138](∅→∅),[20.9054]→[20.9054:9138](∅→∅),[20.9138]→[20.1879:1978](∅→∅),[20.1978]→[20.7074:7098](∅→∅),[20.7074]→[20.7074:7098](∅→∅),[20.979]→[20.9255:9302](∅→∅),[20.7098]→[20.9255:9302](∅→∅),[20.9255]→[20.9255:9302](∅→∅)
love.graphics.print("You're currently drawing a "..current_shape(drawing.pending), Margin_left+30,y)y = y + Line_heightlove.graphics.print('Things you can do now:', Margin_left+30,y)y = y + Line_heightif Current_drawing_mode == 'freehand' thenlove.graphics.print('* Release the mouse button to finish drawing the stroke', Margin_left+30,y)y = y + Line_heightelseif Current_drawing_mode == 'line' or Current_drawing_mode == 'manhattan' thenlove.graphics.print('* Release the mouse button to finish drawing the line', Margin_left+30,y)y = y + Line_heightelseif Current_drawing_mode == 'circle' thenlove.graphics.print("You're currently drawing a "..current_shape(drawing.pending), Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print('Things you can do now:', Editor_state.margin_left+30,y)y = y + Editor_state.line_heightif Editor_state.current_drawing_mode == 'freehand' thenlove.graphics.print('* Release the mouse button to finish drawing the stroke', Editor_state.margin_left+30,y)y = y + Editor_state.line_heightelseif Editor_state.current_drawing_mode == 'line' or Editor_state.current_drawing_mode == 'manhattan' thenlove.graphics.print('* Release the mouse button to finish drawing the line', Editor_state.margin_left+30,y)y = y + Editor_state.line_heightelseif Editor_state.current_drawing_mode == 'circle' then - replacement in help.lua at line 67[20.9347]→[20.1979:2082](∅→∅),[20.2082]→[20.7193:7219](∅→∅),[20.7193]→[20.7193:7219](∅→∅),[20.7219]→[20.2083:2174](∅→∅)
love.graphics.print('* Release the mouse button to finish drawing the circle', Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Press 'a' to draw just an arc of a circle", Margin_left+30,y)love.graphics.print('* Release the mouse button to finish drawing the circle', Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print("* Press 'a' to draw just an arc of a circle", Editor_state.margin_left+30,y) - replacement in help.lua at line 71
love.graphics.print('* Release the mouse button to finish drawing the arc', Margin_left+30,y)love.graphics.print('* Release the mouse button to finish drawing the arc', Editor_state.margin_left+30,y) - replacement in help.lua at line 73[20.9678]→[20.7394:7418](∅→∅),[20.1047]→[20.9696:9744](∅→∅),[20.7418]→[20.9696:9744](∅→∅),[20.9696]→[20.9696:9744](∅→∅),[20.9744]→[20.2276:2378](∅→∅),[20.2378]→[20.7512:7536](∅→∅),[20.7512]→[20.7512:7536](∅→∅),[20.7536]→[20.2379:2467](∅→∅),[20.2467]→[20.7615:7639](∅→∅),[20.7615]→[20.7615:7639](∅→∅),[20.7639]→[20.12:62](∅→∅)
y = y + Line_heightelseif Current_drawing_mode == 'polygon' thenlove.graphics.print('* Release the mouse button to finish drawing the polygon', Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Press 'p' to add a vertex to the polygon", Margin_left+30,y)y = y + Line_heightelseif Current_drawing_mode == 'rectangle' theny = y + Editor_state.line_heightelseif Editor_state.current_drawing_mode == 'polygon' thenlove.graphics.print('* Release the mouse button to finish drawing the polygon', Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print("* Press 'p' to add a vertex to the polygon", Editor_state.margin_left+30,y)y = y + Editor_state.line_heightelseif Editor_state.current_drawing_mode == 'rectangle' then - replacement in help.lua at line 81
love.graphics.print("* Press 'p' to add a vertex to the rectangle", Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Press 'p' to add a vertex to the rectangle", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 84[20.231]→[20.231:363](∅→∅),[20.363]→[6.12:117](∅→∅),[6.117]→[20.469:495](∅→∅),[20.469]→[20.469:495](∅→∅)
love.graphics.print('* Release the mouse button to finish drawing the rectangle', Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Press 'p' to replace the second vertex of the rectangle", Margin_left+30,y)y = y + Line_heightlove.graphics.print('* Release the mouse button to finish drawing the rectangle', Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print("* Press 'p' to replace the second vertex of the rectangle", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 89
elseif Current_drawing_mode == 'square' thenelseif Editor_state.current_drawing_mode == 'square' then - replacement in help.lua at line 91
love.graphics.print("* Press 'p' to add a vertex to the square", Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Press 'p' to add a vertex to the square", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 94[20.716]→[20.716:845](∅→∅),[20.845]→[6.118:220](∅→∅),[6.220]→[20.948:974](∅→∅),[20.948]→[20.948:974](∅→∅)
love.graphics.print('* Release the mouse button to finish drawing the square', Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Press 'p' to replace the second vertex of the square", Margin_left+30,y)y = y + Line_heightlove.graphics.print('* Release the mouse button to finish drawing the square', Editor_state.margin_left+30,y)y = y + Editor_state.line_heightlove.graphics.print("* Press 'p' to replace the second vertex of the square", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 100[20.9976]→[20.2468:2583](∅→∅),[20.2583]→[20.7746:7790](∅→∅),[20.7746]→[20.7746:7790](∅→∅),[20.1174]→[20.10123:10164](∅→∅),[20.7790]→[20.10123:10164](∅→∅),[20.10123]→[20.10123:10164](∅→∅),[20.10164]→[20.2584:2668](∅→∅),[20.2668]→[20.7866:7890](∅→∅),[20.7866]→[20.7866:7890](∅→∅)
love.graphics.print("* Press 'esc' then release the mouse button to cancel the current shape", Margin_left+30,y)y = y + Line_heighty = y + Line_heightif Current_drawing_mode ~= 'line' thenlove.graphics.print("* Press 'l' to switch to drawing lines", Margin_left+30,y)y = y + Line_heightlove.graphics.print("* Press 'esc' then release the mouse button to cancel the current shape", Editor_state.margin_left+30,y)y = y + Editor_state.line_heighty = y + Editor_state.line_heightif Editor_state.current_drawing_mode ~= 'line' thenlove.graphics.print("* Press 'l' to switch to drawing lines", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 107[20.10272]→[20.10272:10318](∅→∅),[20.10318]→[20.2669:2773](∅→∅),[20.2773]→[20.7986:8010](∅→∅),[20.7986]→[20.7986:8010](∅→∅)
if Current_drawing_mode ~= 'manhattan' thenlove.graphics.print("* Press 'm' to switch to drawing horizontal/vertical lines", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'manhattan' thenlove.graphics.print("* Press 'm' to switch to drawing horizontal/vertical lines", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 111[20.10446]→[20.10446:10489](∅→∅),[20.10489]→[20.2774:2865](∅→∅),[20.182]→[20.8093:8117](∅→∅),[20.2865]→[20.8093:8117](∅→∅),[20.8093]→[20.8093:8117](∅→∅)
if Current_drawing_mode ~= 'circle' thenlove.graphics.print("* Press 'o' to switch to drawing circles/arcs", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'circle' thenlove.graphics.print("* Press 'o' to switch to drawing circles/arcs", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 115[20.10604]→[20.10604:10648](∅→∅),[20.10648]→[20.2866:2953](∅→∅),[20.2953]→[20.8196:8220](∅→∅),[20.8196]→[20.8196:8220](∅→∅)
if Current_drawing_mode ~= 'polygon' thenlove.graphics.print("* Press 'g' to switch to drawing polygons", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'polygon' thenlove.graphics.print("* Press 'g' to switch to drawing polygons", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 119[20.751]→[20.751:797](∅→∅),[20.797]→[20.2954:3043](∅→∅),[20.92]→[20.8301:8325](∅→∅),[20.3043]→[20.8301:8325](∅→∅),[20.8301]→[20.8301:8325](∅→∅)
if Current_drawing_mode ~= 'rectangle' thenlove.graphics.print("* Press 'r' to switch to drawing rectangles", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'rectangle' thenlove.graphics.print("* Press 'r' to switch to drawing rectangles", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 123[20.910]→[20.910:953](∅→∅),[20.953]→[20.3044:3130](∅→∅),[20.170]→[20.8403:8427](∅→∅),[20.3130]→[20.8403:8427](∅→∅),[20.8403]→[20.8403:8427](∅→∅)
if Current_drawing_mode ~= 'square' thenlove.graphics.print("* Press 's' to switch to drawing squares", Margin_left+30,y)y = y + Line_heightif Editor_state.current_drawing_mode ~= 'square' thenlove.graphics.print("* Press 's' to switch to drawing squares", Editor_state.margin_left+30,y)y = y + Editor_state.line_height - replacement in help.lua at line 128
love.graphics.rectangle('fill', Margin_left,drawing.y, App.screen.width-Margin_width, math.max(Drawing.pixels(drawing.h),y-drawing.y))love.graphics.rectangle('fill', Editor_state.margin_left,drawing.y, App.screen.width-Editor_state.margin_width, math.max(Drawing.pixels(drawing.h),y-drawing.y)) - replacement in help.lua at line 132
if Current_drawing_mode == 'freehand' thenif Editor_state.current_drawing_mode == 'freehand' then - replacement in help.lua at line 134
elseif Current_drawing_mode == 'line' thenelseif Editor_state.current_drawing_mode == 'line' then - replacement in help.lua at line 136
elseif Current_drawing_mode == 'manhattan' thenelseif Editor_state.current_drawing_mode == 'manhattan' then - replacement in help.lua at line 138
elseif Current_drawing_mode == 'circle' and shape and shape.start_angle thenelseif Editor_state.current_drawing_mode == 'circle' and shape and shape.start_angle then - replacement in help.lua at line 141
return Current_drawing_modereturn Editor_state.current_drawing_mode - replacement in edit.lua at line 25
function edit.initialize_globals()-- a line is either text or a drawing-- a text is a table with:-- mode = 'text',-- string data,-- startpos, the index of data the line starts rendering from (if currently on screen), can only be >1 for topmost line on screen-- starty, the y coord in pixels-- some cached data that's blown away and recomputed when data changes:-- fragments: snippets of rendered love.graphics.Text, guaranteed to not wrap-- screen_line_starting_pos: optional array of grapheme indices if it wraps over more than one screen line-- a drawing is a table with:-- mode = 'drawing'-- a (y) coord in pixels (updated while painting screen),-- a (h)eight,-- an array of points, and-- an array of shapes-- a shape is a table containing:-- a mode-- an array points for mode 'freehand' (raw x,y coords; freehand drawings don't pollute the points array of a drawing)-- an array vertices for mode 'polygon', 'rectangle', 'square'-- p1, p2 for mode 'line'-- center, radius for mode 'circle'-- center, radius, start_angle, end_angle for mode 'arc'-- Unless otherwise specified, coord fields are normalized; a drawing is always 256 units wide-- The field names are carefully chosen so that switching modes in midstream-- remembers previously entered points where that makes sense.Lines = {{mode='text', data=''}}function edit.initialize_state()local result = {-- a line is either text or a drawing-- a text is a table with:-- mode = 'text',-- string data,-- startpos, the index of data the line starts rendering from (if currently on screen), can only be >1 for topmost line on screen-- starty, the y coord in pixels-- some cached data that's blown away and recomputed when data changes:-- fragments: snippets of rendered love.graphics.Text, guaranteed to not wrap-- screen_line_starting_pos: optional array of grapheme indices if it wraps over more than one screen line-- a drawing is a table with:-- mode = 'drawing'-- a (y) coord in pixels (updated while painting screen),-- a (h)eight,-- an array of points, and-- an array of shapes-- a shape is a table containing:-- a mode-- an array points for mode 'freehand' (raw x,y coords; freehand drawings don't pollute the points array of a drawing)-- an array vertices for mode 'polygon', 'rectangle', 'square'-- p1, p2 for mode 'line'-- center, radius for mode 'circle'-- center, radius, start_angle, end_angle for mode 'arc'-- Unless otherwise specified, coord fields are normalized; a drawing is always 256 units wide-- The field names are carefully chosen so that switching modes in midstream-- remembers previously entered points where that makes sense.lines = {{mode='text', data=''}}, - replacement in edit.lua at line 54
-- Lines can be too long to fit on screen, in which case they _wrap_ into-- multiple _screen lines_.---- Therefore, any potential location for the cursor can be described in two ways:-- * schema 1: As a combination of line index and position within a line (in utf8 codepoint units)-- * schema 2: As a combination of line index, screen line index within the line, and a position within the screen line.---- Most of the time we'll only persist positions in schema 1, translating to-- schema 2 when that's convenient.---- Make sure these coordinates are never aliased, so that changing one causes-- action at a distance.Screen_top1 = {line=1, pos=1} -- position of start of screen line at top of screenCursor1 = {line=1, pos=1} -- position of cursorScreen_bottom1 = {line=1, pos=1} -- position of start of screen line at bottom of screen-- Lines can be too long to fit on screen, in which case they _wrap_ into-- multiple _screen lines_.---- Therefore, any potential location for the cursor can be described in two ways:-- * schema 1: As a combination of line index and position within a line (in utf8 codepoint units)-- * schema 2: As a combination of line index, screen line index within the line, and a position within the screen line.---- Most of the time we'll only persist positions in schema 1, translating to-- schema 2 when that's convenient.---- Make sure these coordinates are never aliased, so that changing one causes-- action at a distance.screen_top1 = {line=1, pos=1}, -- position of start of screen line at top of screencursor1 = {line=1, pos=1}, -- position of cursorscreen_bottom1 = {line=1, pos=1}, -- position of start of screen line at bottom of screen - replacement in edit.lua at line 70
Selection1 = {}Old_cursor1, Old_selection1, Mousepress_shift = nil -- some extra state to compute selection between mouse press and releaseRecent_mouse = {} -- when selecting text, avoid recomputing some state on every single frameselection1 = {},-- some extra state to compute selection between mouse press and releaseold_cursor1 = nil,old_selection1 = nil,mousepress_shift = nil,-- when selecting text, avoid recomputing some state on every single framerecent_mouse = {}, - replacement in edit.lua at line 78
Cursor_x, Cursor_y = 0, 0 -- in pixelsCurrent_drawing_mode = 'line'Previous_drawing_mode = nil-- cursor coordinates in pixelscursor_x = 0,cursor_y = 0, - replacement in edit.lua at line 82
-- values for testsFont_height = 14Line_height = 15-- widest possible character widthEm = App.newText(love.graphics.getFont(), 'm')current_drawing_mode = 'line',previous_drawing_mode = nil, -- extra state for some ephemeral modes like moving/deleting/naming points - replacement in edit.lua at line 85
Margin_top = 15Margin_left = 25Margin_right = 25Margin_width = Margin_left + Margin_right-- these default values are important for testsfont_height = 14,line_height = 15,-- widest possible character widthem = App.newText(love.graphics.getFont(), 'm'), - replacement in edit.lua at line 91
Drawing_padding_top = 10Drawing_padding_bottom = 10Drawing_padding_height = Drawing_padding_top + Drawing_padding_bottommargin_top = 15,margin_left = 25,margin_right = 25,margin_width = nil, - replacement in edit.lua at line 96
Filename = love.filesystem.getUserDirectory()..'/lines.txt'Next_save = nildrawing_padding_top = 10,drawing_padding_bottom = 10,drawing_padding_height = nil, - replacement in edit.lua at line 100
-- undoHistory = {}Next_history = 1filename = love.filesystem.getUserDirectory()..'/lines.txt',next_save = nil, - replacement in edit.lua at line 103
-- searchSearch_term = nilSearch_text = nilSearch_backup = nil -- stuff to restore when cancelling search-- undohistory = {},next_history = 1, - replacement in edit.lua at line 107
end -- App.initialize_globals-- searchsearch_term = nil,search_text = nil,search_backup = nil, -- stuff to restore when cancelling search}result.margin_width = result.margin_left + result.margin_rightresult.drawing_padding_height = result.drawing_padding_top + result.drawing_padding_bottomreturn resultend -- App.initialize_state - replacement in edit.lua at line 119
--? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos)assert(Text.le1(Screen_top1, Cursor1))Cursor_y = -1local y = Margin_top--? print(Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.cursor1.line, Editor_state.cursor1.pos)assert(Text.le1(Editor_state.screen_top1, Editor_state.cursor1))Editor_state.cursor_y = -1local y = Editor_state.margin_top - replacement in edit.lua at line 124
for line_index = Screen_top1.line,#Lines dolocal line = Lines[line_index]for line_index = Editor_state.screen_top1.line,#Editor_state.lines dolocal line = Editor_state.lines[line_index] - replacement in edit.lua at line 127
if y + Line_height > App.screen.height then break endScreen_bottom1.line = line_indexif y + Editor_state.line_height > App.screen.height then break endEditor_state.screen_bottom1.line = line_index - replacement in edit.lua at line 137
table.insert(Lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})if Cursor1.line >= line_index thenCursor1.line = Cursor1.line+1table.insert(Editor_state.lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})if Editor_state.cursor1.line >= line_index thenEditor_state.cursor1.line = Editor_state.cursor1.line+1 - replacement in edit.lua at line 145
if Search_term == nil thenif line_index == Cursor1.line thenText.draw_cursor(Margin_left, y)if Editor_state.search_term == nil thenif line_index == Editor_state.cursor1.line thenText.draw_cursor(Editor_state.margin_left, y) - replacement in edit.lua at line 150
Screen_bottom1.pos = Screen_top1.posy = y + Line_heightEditor_state.screen_bottom1.pos = Editor_state.screen_top1.posy = y + Editor_state.line_height - replacement in edit.lua at line 153
y = y+Drawing_padding_topy = y+Editor_state.drawing_padding_top - replacement in edit.lua at line 156
y = y + Drawing.pixels(line.h) + Drawing_padding_bottomy = y + Drawing.pixels(line.h) + Editor_state.drawing_padding_bottom - replacement in edit.lua at line 160
if line_index == Screen_top1.line thenline.startpos = Screen_top1.posif line_index == Editor_state.screen_top1.line thenline.startpos = Editor_state.screen_top1.pos - replacement in edit.lua at line 164
y, Screen_bottom1.pos = Text.draw(line, line_index, line.starty, Margin_left, App.screen.width-Margin_right)y = y + Line_heighty, Editor_state.screen_bottom1.pos = Text.draw(line, line_index, line.starty, Editor_state.margin_left, App.screen.width-Editor_state.margin_right)y = y + Editor_state.line_height - replacement in edit.lua at line 169
if Cursor_y == -1 thenCursor_y = App.screen.heightif Editor_state.cursor_y == -1 thenEditor_state.cursor_y = App.screen.height - replacement in edit.lua at line 172
--? print('screen bottom: '..tostring(Screen_bottom1.pos)..' in '..tostring(Lines[Screen_bottom1.line].data))if Search_term then--? print('screen bottom: '..tostring(Editor_state.screen_bottom1.pos)..' in '..tostring(Editor_state.lines[Editor_state.screen_bottom1.line].data))if Editor_state.search_term then - replacement in edit.lua at line 180
if Next_save and Next_save < App.getTime() thensave_to_disk(Lines, Filename)Next_save = nilif Editor_state.next_save and Editor_state.next_save < App.getTime() thensave_to_disk(Editor_state.lines, Editor_state.filename)Editor_state.next_save = nil - replacement in edit.lua at line 187
if Next_save == nil thenNext_save = App.getTime() + 3 -- short enough that you're likely to still remember what you didif Editor_state.next_save == nil thenEditor_state.next_save = App.getTime() + 3 -- short enough that you're likely to still remember what you did - replacement in edit.lua at line 194
if Next_save thensave_to_disk(Lines, Filename)if Editor_state.next_save thensave_to_disk(Editor_state.lines, Editor_state.filename) - replacement in edit.lua at line 200
if Search_term then return end--? print('press', Selection1.line, Selection1.pos)if Editor_state.search_term then return end--? print('press', Editor_state.selection1.line, Editor_state.selection1.pos) - replacement in edit.lua at line 204
for line_index,line in ipairs(Lines) dofor line_index,line in ipairs(Editor_state.lines) do - replacement in edit.lua at line 206
if Text.in_line(line, x,y, Margin_left, App.screen.width-Margin_right) thenif Text.in_line(line, x,y, Editor_state.margin_left, App.screen.width-Editor_state.margin_right) then - replacement in edit.lua at line 216
Old_cursor1 = Cursor1Old_selection1 = Selection1Mousepress_shift = App.shift_down()Selection1 = {Editor_state.old_cursor1 = Editor_state.cursor1Editor_state.old_selection1 = Editor_state.selection1Editor_state.mousepress_shift = App.shift_down()Editor_state.selection1 = { - replacement in edit.lua at line 221
pos=Text.to_pos_on_line(line, x, y, Margin_left, App.screen.width-Margin_right),pos=Text.to_pos_on_line(line, x, y, Editor_state.margin_left, App.screen.width-Editor_state.margin_right), - replacement in edit.lua at line 223
--? print('selection', Selection1.line, Selection1.pos)--? print('selection', Editor_state.selection1.line, Editor_state.selection1.pos) - replacement in edit.lua at line 228
Lines.current_drawing_index = line_indexLines.current_drawing = lineEditor_state.lines.current_drawing_index = line_indexEditor_state.lines.current_drawing = line - replacement in edit.lua at line 239
if Search_term then return endif Editor_state.search_term then return end - replacement in edit.lua at line 241
if Lines.current_drawing thenif Editor_state.lines.current_drawing then - replacement in edit.lua at line 245
record_undo_event({before=Drawing.before, after=snapshot(Lines.current_drawing_index)})record_undo_event({before=Drawing.before, after=snapshot(Editor_state.lines.current_drawing_index)}) - replacement in edit.lua at line 249
for line_index,line in ipairs(Lines) dofor line_index,line in ipairs(Editor_state.lines) do - replacement in edit.lua at line 251
if Text.in_line(line, x,y, Margin_left, App.screen.width-Margin_right) thenif Text.in_line(line, x,y, Editor_state.margin_left, App.screen.width-Editor_state.margin_right) then - replacement in edit.lua at line 253
Cursor1 = {Editor_state.cursor1 = { - replacement in edit.lua at line 255
pos=Text.to_pos_on_line(line, x, y, Margin_left, App.screen.width-Margin_right),pos=Text.to_pos_on_line(line, x, y, Editor_state.margin_left, App.screen.width-Editor_state.margin_right), - replacement in edit.lua at line 257
--? print('cursor', Cursor1.line, Cursor1.pos)if Mousepress_shift thenif Old_selection1.line == nil thenSelection1 = Old_cursor1--? print('cursor', Editor_state.cursor1.line, Editor_state.cursor1.pos)if Editor_state.mousepress_shift thenif Editor_state.old_selection1.line == nil thenEditor_state.selection1 = Editor_state.old_cursor1 - replacement in edit.lua at line 262
Selection1 = Old_selection1Editor_state.selection1 = Editor_state.old_selection1 - replacement in edit.lua at line 265
Old_cursor1, Old_selection1, Mousepress_shift = nilif eq(Cursor1, Selection1) thenSelection1 = {}Editor_state.old_cursor1, Editor_state.old_selection1, Editor_state.mousepress_shift = nilif eq(Editor_state.cursor1, Editor_state.selection1) thenEditor_state.selection1 = {} - replacement in edit.lua at line 273
--? print('selection:', Selection1.line, Selection1.pos)--? print('selection:', Editor_state.selection1.line, Editor_state.selection1.pos) - replacement in edit.lua at line 278
for _,line in ipairs(Lines) do line.y = nil end -- just in case we scrollif Search_term thenSearch_term = Search_term..tSearch_text = nilfor _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scrollif Editor_state.search_term thenEditor_state.search_term = Editor_state.search_term..tEditor_state.search_text = nil - replacement in edit.lua at line 283
elseif Current_drawing_mode == 'name' thenlocal before = snapshot(Lines.current_drawing_index)local drawing = Lines.current_drawingelseif Editor_state.current_drawing_mode == 'name' thenlocal before = snapshot(Editor_state.lines.current_drawing_index)local drawing = Editor_state.lines.current_drawing - replacement in edit.lua at line 288
record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)})record_undo_event({before=before, after=snapshot(Editor_state.lines.current_drawing_index)}) - replacement in edit.lua at line 296
if Selection1.line andnot Lines.current_drawing andif Editor_state.selection1.line andnot Editor_state.lines.current_drawing and - replacement in edit.lua at line 302
Text.delete_selection(Margin_left, App.screen.width-Margin_right)Text.delete_selection(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in edit.lua at line 304
if Search_term thenif Editor_state.search_term then - replacement in edit.lua at line 306
Search_term = nilSearch_text = nilCursor1 = Search_backup.cursorScreen_top1 = Search_backup.screen_topSearch_backup = nilEditor_state.search_term = nilEditor_state.search_text = nilEditor_state.cursor1 = Editor_state.search_backup.cursorEditor_state.screen_top1 = Editor_state.search_backup.screen_topEditor_state.search_backup = nil - replacement in edit.lua at line 313
Search_term = nilSearch_text = nilSearch_backup = nilEditor_state.search_term = nilEditor_state.search_text = nilEditor_state.search_backup = nil - replacement in edit.lua at line 317
local len = utf8.len(Search_term)local byte_offset = Text.offset(Search_term, len)Search_term = string.sub(Search_term, 1, byte_offset-1)Search_text = nillocal len = utf8.len(Editor_state.search_term)local byte_offset = Text.offset(Editor_state.search_term, len)Editor_state.search_term = string.sub(Editor_state.search_term, 1, byte_offset-1)Editor_state.search_text = nil - replacement in edit.lua at line 322
Cursor1.pos = Cursor1.pos+1Editor_state.cursor1.pos = Editor_state.cursor1.pos+1 - replacement in edit.lua at line 329
Search_term = ''Search_backup = {cursor={line=Cursor1.line, pos=Cursor1.pos}, screen_top={line=Screen_top1.line, pos=Screen_top1.pos}}assert(Search_text == nil)Editor_state.search_term = ''Editor_state.search_backup = {cursor={line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}, screen_top={line=Editor_state.screen_top1.line, pos=Editor_state.screen_top1.pos}}assert(Editor_state.search_text == nil) - replacement in edit.lua at line 333
initialize_font_settings(Font_height+2)initialize_font_settings(Editor_state.font_height+2) - replacement in edit.lua at line 336
initialize_font_settings(Font_height-2)initialize_font_settings(Editor_state.font_height-2) - replacement in edit.lua at line 342
for _,line in ipairs(Lines) do line.y = nil end -- just in case we scrollfor _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll - replacement in edit.lua at line 346
Screen_top1 = deepcopy(src.screen_top)Cursor1 = deepcopy(src.cursor)Selection1 = deepcopy(src.selection)patch(Lines, event.after, event.before)Editor_state.screen_top1 = deepcopy(src.screen_top)Editor_state.cursor1 = deepcopy(src.cursor)Editor_state.selection1 = deepcopy(src.selection)patch(Editor_state.lines, event.after, event.before) - replacement in edit.lua at line 354
for _,line in ipairs(Lines) do line.y = nil end -- just in case we scrollfor _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll - replacement in edit.lua at line 358
Screen_top1 = deepcopy(src.screen_top)Cursor1 = deepcopy(src.cursor)Selection1 = deepcopy(src.selection)patch(Lines, event.before, event.after)Editor_state.screen_top1 = deepcopy(src.screen_top)Editor_state.cursor1 = deepcopy(src.cursor)Editor_state.selection1 = deepcopy(src.selection)patch(Editor_state.lines, event.before, event.after) - replacement in edit.lua at line 367
for _,line in ipairs(Lines) do line.y = nil end -- just in case we scrollfor _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll - replacement in edit.lua at line 373
for _,line in ipairs(Lines) do line.y = nil end -- just in case we scrolllocal s = Text.cut_selection(Margin_left, App.screen.width-Margin_right)for _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scrolllocal s = Text.cut_selection(Editor_state.margin_left, App.screen.width-Editor_state.margin_right) - replacement in edit.lua at line 380
for _,line in ipairs(Lines) do line.y = nil end -- just in case we scrollfor _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll - replacement in edit.lua at line 383
local before_line = Cursor1.linelocal before_line = Editor_state.cursor1.line - replacement in edit.lua at line 395
Text.snap_cursor_to_bottom_of_screen(Margin_left, App.screen.height-Margin_right)Text.snap_cursor_to_bottom_of_screen(Editor_state.margin_left, App.screen.height-Editor_state.margin_right) - replacement in edit.lua at line 398
record_undo_event({before=before, after=snapshot(before_line, Cursor1.line)})record_undo_event({before=before, after=snapshot(before_line, Editor_state.cursor1.line)}) - replacement in edit.lua at line 410
for _,line in ipairs(Lines) dofor _,line in ipairs(Editor_state.lines) do - replacement in edit.lua at line 415
elseif Current_drawing_mode == 'name' thenelseif Editor_state.current_drawing_mode == 'name' then - replacement in edit.lua at line 417
Current_drawing_mode = Previous_drawing_modePrevious_drawing_mode = nilEditor_state.current_drawing_mode = Editor_state.previous_drawing_modeEditor_state.previous_drawing_mode = nil - replacement in edit.lua at line 420
local before = snapshot(Lines.current_drawing_index)local drawing = Lines.current_drawinglocal before = snapshot(Editor_state.lines.current_drawing_index)local drawing = Editor_state.lines.current_drawing - replacement in edit.lua at line 425
record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)})record_undo_event({before=before, after=snapshot(Editor_state.lines.current_drawing_index)}) - replacement in edit.lua at line 431
record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)})record_undo_event({before=before, after=snapshot(Editor_state.lines.current_drawing_index)}) - replacement in edit.lua at line 436
for _,line in ipairs(Lines) do line.y = nil end -- just in case we scrollfor _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll - replacement in drawing_tests.lua at line 8
Filename = 'foo'Lines = load_array{}Editor_state.filename = 'foo'Editor_state.lines = load_array{} - replacement in drawing_tests.lua at line 12
App.run_after_mouse_click(8,Margin_top+8, 1)App.run_after_mouse_click(8,Editor_state.margin_top+8, 1) - replacement in drawing_tests.lua at line 26[20.353]→[20.482:501](∅→∅),[20.501]→[20.4670:4764](∅→∅),[20.2342]→[20.406:450](∅→∅),[20.4764]→[20.406:450](∅→∅),[20.406]→[20.406:450](∅→∅),[20.255]→[20.509:541](∅→∅),[20.509]→[20.509:541](∅→∅)
Filename = 'foo'App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 31
check_eq(#Lines, 2, 'F - test_draw_line/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_draw_line/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_draw_line/baseline/y')check_eq(Lines[1].h, 128, 'F - test_draw_line/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_draw_line/baseline/#shapes')check_eq(#Editor_state.lines, 2, 'F - test_draw_line/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_line/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_line/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_line/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_line/baseline/#shapes') - replacement in drawing_tests.lua at line 37
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 54
Lines = load_from_disk(Filename)local drawing = Lines[1]Editor_state.lines = load_from_disk(Editor_state.filename)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 70[20.313]→[20.4765:4859](∅→∅),[20.2436]→[20.366:410](∅→∅),[20.4859]→[20.366:410](∅→∅),[20.366]→[20.366:410](∅→∅),[20.327]→[20.469:506](∅→∅),[20.469]→[20.469:506](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'manhattan'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'manhattan' - replacement in drawing_tests.lua at line 74
check_eq(#Lines, 2, 'F - test_draw_horizontal_line/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_draw_horizontal_line/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_draw_horizontal_line/baseline/y')check_eq(Lines[1].h, 128, 'F - test_draw_horizontal_line/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_draw_horizontal_line/baseline/#shapes')check_eq(#Editor_state.lines, 2, 'F - test_draw_horizontal_line/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_horizontal_line/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_horizontal_line/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_horizontal_line/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_horizontal_line/baseline/#shapes') - replacement in drawing_tests.lua at line 80
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+26, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 97[20.1916]→[20.4860:4954](∅→∅),[20.2530]→[20.1969:2013](∅→∅),[20.4954]→[20.1969:2013](∅→∅),[20.1969]→[20.1969:2013](∅→∅),[20.399]→[20.2072:2104](∅→∅),[20.2072]→[20.2072:2104](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 101
check_eq(#Lines, 2, 'F - test_draw_circle/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_draw_circle/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_draw_circle/baseline/y')check_eq(Lines[1].h, 128, 'F - test_draw_circle/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_draw_circle/baseline/#shapes')check_eq(#Editor_state.lines, 2, 'F - test_draw_circle/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_circle/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_circle/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_circle/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_circle/baseline/#shapes') - replacement in drawing_tests.lua at line 107
App.mouse_move(Margin_left+4, Margin_top+Drawing_padding_top+4) -- hover on drawingApp.mouse_move(Editor_state.margin_left+4, Editor_state.margin_top+Editor_state.drawing_padding_top+4) -- hover on drawing - replacement in drawing_tests.lua at line 109
App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_release(Margin_left+35+30, Margin_top+Drawing_padding_top+36, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)App.run_after_mouse_release(Editor_state.margin_left+35+30, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 124
Filename = 'foo'App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 129
check_eq(#Lines, 2, 'F - test_cancel_stroke/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_cancel_stroke/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_cancel_stroke/baseline/y')check_eq(Lines[1].h, 128, 'F - test_cancel_stroke/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_cancel_stroke/baseline/#shapes')check_eq(#Editor_state.lines, 2, 'F - test_cancel_stroke/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_cancel_stroke/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_cancel_stroke/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_cancel_stroke/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_cancel_stroke/baseline/#shapes') - replacement in drawing_tests.lua at line 135
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1) - replacement in drawing_tests.lua at line 138
App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)local drawing = Lines[1]App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 146[20.3500]→[20.4955:5049](∅→∅),[20.2624]→[20.3553:3597](∅→∅),[20.5049]→[20.3553:3597](∅→∅),[20.3553]→[20.3553:3597](∅→∅),[20.471]→[20.3656:3688](∅→∅),[20.3656]→[20.3656:3688](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 151
App.mouse_move(Margin_left+4, Margin_top+Drawing_padding_top+4) -- hover on drawingApp.mouse_move(Editor_state.margin_left+4, Editor_state.margin_top+Editor_state.drawing_padding_top+4) -- hover on drawing - replacement in drawing_tests.lua at line 154
check_eq(Current_drawing_mode, 'line', 'F - test_keys_do_not_affect_shape_when_mouse_up/drawing_mode')check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_keys_do_not_affect_shape_when_mouse_up/drawing_mode') - replacement in drawing_tests.lua at line 161[20.4277]→[20.5050:5144](∅→∅),[20.2718]→[20.4330:4374](∅→∅),[20.5144]→[20.4330:4374](∅→∅),[20.4330]→[20.4330:4374](∅→∅),[20.543]→[20.4433:4465](∅→∅),[20.4433]→[20.4433:4465](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 165
check_eq(#Lines, 2, 'F - test_draw_circle_mid_stroke/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_draw_circle_mid_stroke/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_draw_circle_mid_stroke/baseline/y')check_eq(Lines[1].h, 128, 'F - test_draw_circle_mid_stroke/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_draw_circle_mid_stroke/baseline/#shapes')check_eq(#Editor_state.lines, 2, 'F - test_draw_circle_mid_stroke/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_circle_mid_stroke/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_circle_mid_stroke/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_circle_mid_stroke/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_circle_mid_stroke/baseline/#shapes') - replacement in drawing_tests.lua at line 171
App.mouse_move(Margin_left+4, Margin_top+Drawing_padding_top+4) -- hover on drawingApp.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.mouse_move(Editor_state.margin_left+4, Editor_state.margin_top+Editor_state.drawing_padding_top+4) -- hover on drawingApp.run_after_mouse_press(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1) - replacement in drawing_tests.lua at line 174
App.run_after_mouse_release(Margin_left+35+30, Margin_top+Drawing_padding_top+36, 1)local drawing = Lines[1]App.run_after_mouse_release(Editor_state.margin_left+35+30, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 188[20.5906]→[20.5145:5239](∅→∅),[20.2812]→[20.5959:6003](∅→∅),[20.5239]→[20.5959:6003](∅→∅),[20.5959]→[20.5959:6003](∅→∅),[20.615]→[20.6062:6096](∅→∅),[20.6062]→[20.6062:6096](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'circle'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'circle' - replacement in drawing_tests.lua at line 192
check_eq(#Lines, 2, 'F - test_draw_arc/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_draw_arc/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_draw_arc/baseline/y')check_eq(Lines[1].h, 128, 'F - test_draw_arc/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_draw_arc/baseline/#shapes')check_eq(#Editor_state.lines, 2, 'F - test_draw_arc/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_arc/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_arc/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_arc/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_arc/baseline/#shapes') - replacement in drawing_tests.lua at line 198
App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.mouse_move(Margin_left+35+30, Margin_top+Drawing_padding_top+36)App.run_after_mouse_press(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)App.mouse_move(Editor_state.margin_left+35+30, Editor_state.margin_top+Editor_state.drawing_padding_top+36) - replacement in drawing_tests.lua at line 201
App.run_after_mouse_release(Margin_left+35+50, Margin_top+Drawing_padding_top+36+50, 1) -- 45°local drawing = Lines[1]App.run_after_mouse_release(Editor_state.margin_left+35+50, Editor_state.margin_top+Editor_state.drawing_padding_top+36+50, 1) -- 45°local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 218[20.847]→[20.5240:5334](∅→∅),[20.2906]→[20.900:944](∅→∅),[20.5334]→[20.900:944](∅→∅),[20.900]→[20.900:944](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''} - replacement in drawing_tests.lua at line 221
check_eq(Current_drawing_mode, 'line', 'F - test_draw_polygon/baseline/drawing_mode')check_eq(#Lines, 2, 'F - test_draw_polygon/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_draw_polygon/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_draw_polygon/baseline/y')check_eq(Lines[1].h, 128, 'F - test_draw_polygon/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_draw_polygon/baseline/#shapes')check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_draw_polygon/baseline/drawing_mode')check_eq(#Editor_state.lines, 2, 'F - test_draw_polygon/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_polygon/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_polygon/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_polygon/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_polygon/baseline/#shapes') - replacement in drawing_tests.lua at line 228
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1) - replacement in drawing_tests.lua at line 231
App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+36)App.mouse_move(Editor_state.margin_left+65, Editor_state.margin_top+Editor_state.drawing_padding_top+36) - replacement in drawing_tests.lua at line 234
App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+26, 1)local drawing = Lines[1]App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 255[20.2783]→[20.5335:5429](∅→∅),[20.3000]→[20.2836:2880](∅→∅),[20.5429]→[20.2836:2880](∅→∅),[20.2836]→[20.2836:2880](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''} - replacement in drawing_tests.lua at line 258
check_eq(Current_drawing_mode, 'line', 'F - test_draw_rectangle/baseline/drawing_mode')check_eq(#Lines, 2, 'F - test_draw_rectangle/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_draw_rectangle/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_draw_rectangle/baseline/y')check_eq(Lines[1].h, 128, 'F - test_draw_rectangle/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_draw_rectangle/baseline/#shapes')check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_draw_rectangle/baseline/drawing_mode')check_eq(#Editor_state.lines, 2, 'F - test_draw_rectangle/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_rectangle/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_rectangle/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_rectangle/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_rectangle/baseline/#shapes') - replacement in drawing_tests.lua at line 265
App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_press(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1) - replacement in drawing_tests.lua at line 268
App.mouse_move(Margin_left+42, Margin_top+Drawing_padding_top+45)App.mouse_move(Editor_state.margin_left+42, Editor_state.margin_top+Editor_state.drawing_padding_top+45) - replacement in drawing_tests.lua at line 271
App.mouse_move(Margin_left+75, Margin_top+Drawing_padding_top+76)App.mouse_move(Editor_state.margin_left+75, Editor_state.margin_top+Editor_state.drawing_padding_top+76) - replacement in drawing_tests.lua at line 274
App.run_after_mouse_release(Margin_left+15, Margin_top+Drawing_padding_top+26, 1)local drawing = Lines[1]App.run_after_mouse_release(Editor_state.margin_left+15, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 298[20.5167]→[20.5430:5524](∅→∅),[20.3094]→[20.5220:5264](∅→∅),[20.5524]→[20.5220:5264](∅→∅),[20.5220]→[20.5220:5264](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''} - replacement in drawing_tests.lua at line 301
check_eq(Current_drawing_mode, 'line', 'F - test_draw_rectangle_intermediate/baseline/drawing_mode')check_eq(#Lines, 2, 'F - test_draw_rectangle_intermediate/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_draw_rectangle_intermediate/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_draw_rectangle_intermediate/baseline/y')check_eq(Lines[1].h, 128, 'F - test_draw_rectangle_intermediate/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_draw_rectangle_intermediate/baseline/#shapes')check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_draw_rectangle_intermediate/baseline/drawing_mode')check_eq(#Editor_state.lines, 2, 'F - test_draw_rectangle_intermediate/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_rectangle_intermediate/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_rectangle_intermediate/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_rectangle_intermediate/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_rectangle_intermediate/baseline/#shapes') - replacement in drawing_tests.lua at line 308
App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_press(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1) - replacement in drawing_tests.lua at line 311
App.mouse_move(Margin_left+42, Margin_top+Drawing_padding_top+45)App.mouse_move(Editor_state.margin_left+42, Editor_state.margin_top+Editor_state.drawing_padding_top+45) - replacement in drawing_tests.lua at line 314
App.mouse_move(Margin_left+75, Margin_top+Drawing_padding_top+76)App.mouse_move(Editor_state.margin_left+75, Editor_state.margin_top+Editor_state.drawing_padding_top+76) - replacement in drawing_tests.lua at line 316
local drawing = Lines[1]local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 333[20.7265]→[20.5525:5619](∅→∅),[20.3188]→[20.7318:7362](∅→∅),[20.5619]→[20.7318:7362](∅→∅),[20.7318]→[20.7318:7362](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''} - replacement in drawing_tests.lua at line 336
check_eq(Current_drawing_mode, 'line', 'F - test_draw_square/baseline/drawing_mode')check_eq(#Lines, 2, 'F - test_draw_square/baseline/#lines')check_eq(Lines[1].mode, 'drawing', 'F - test_draw_square/baseline/mode')check_eq(Lines[1].y, Margin_top+Drawing_padding_top, 'F - test_draw_square/baseline/y')check_eq(Lines[1].h, 128, 'F - test_draw_square/baseline/y')check_eq(#Lines[1].shapes, 0, 'F - test_draw_square/baseline/#shapes')check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_draw_square/baseline/drawing_mode')check_eq(#Editor_state.lines, 2, 'F - test_draw_square/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_square/baseline/mode')check_eq(Editor_state.lines[1].y, Editor_state.margin_top+Editor_state.drawing_padding_top, 'F - test_draw_square/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_square/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_square/baseline/#shapes') - replacement in drawing_tests.lua at line 343
App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_press(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1) - replacement in drawing_tests.lua at line 346
App.mouse_move(Margin_left+42, Margin_top+Drawing_padding_top+45)App.mouse_move(Editor_state.margin_left+42, Editor_state.margin_top+Editor_state.drawing_padding_top+45) - replacement in drawing_tests.lua at line 349
App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+66)App.mouse_move(Editor_state.margin_left+65, Editor_state.margin_top+Editor_state.drawing_padding_top+66) - replacement in drawing_tests.lua at line 352
App.run_after_mouse_release(Margin_left+15, Margin_top+Drawing_padding_top+26, 1)local drawing = Lines[1]App.run_after_mouse_release(Editor_state.margin_left+15, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 375[20.242]→[20.14:33](∅→∅),[20.33]→[20.5620:5714](∅→∅),[20.3282]→[20.295:339](∅→∅),[20.5714]→[20.295:339](∅→∅),[20.295]→[20.295:339](∅→∅),[20.975]→[20.398:430](∅→∅),[20.398]→[20.398:430](∅→∅)
Filename = 'foo'App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 381
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 396
check_eq(Current_drawing_mode, 'name', 'F - test_name_point/mode:1')check_eq(Editor_state.current_drawing_mode, 'name', 'F - test_name_point/mode:1') - replacement in drawing_tests.lua at line 400
check_eq(Current_drawing_mode, 'name', 'F - test_name_point/mode:2')check_eq(Editor_state.current_drawing_mode, 'name', 'F - test_name_point/mode:2') - replacement in drawing_tests.lua at line 403
check_eq(Current_drawing_mode, 'line', 'F - test_name_point/mode:3')check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_name_point/mode:3') - replacement in drawing_tests.lua at line 409
Lines = load_from_disk(Filename)local p2 = Lines[1].points[drawing.shapes[1].p2]Editor_state.lines = load_from_disk(Editor_state.filename)local p2 = Editor_state.lines[1].points[drawing.shapes[1].p2] - replacement in drawing_tests.lua at line 417[20.112]→[20.195:214](∅→∅),[20.214]→[20.5715:5809](∅→∅),[20.3376]→[20.165:209](∅→∅),[20.5809]→[20.165:209](∅→∅),[20.165]→[20.165:209](∅→∅),[20.1047]→[20.268:300](∅→∅),[20.268]→[20.268:300](∅→∅)
Filename = 'foo'App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 422
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 438
Lines = load_from_disk(Filename)local drawing = Lines[1]local p2 = Lines[1].points[drawing.shapes[1].p2]Editor_state.lines = load_from_disk(Editor_state.filename)local drawing = Editor_state.lines[1]local p2 = Editor_state.lines[1].points[drawing.shapes[1].p2] - replacement in drawing_tests.lua at line 446
check_eq(Current_drawing_mode, 'move', 'F - test_move_point/mode:1')check_eq(Editor_state.current_drawing_mode, 'move', 'F - test_move_point/mode:1') - replacement in drawing_tests.lua at line 451
App.mouse_move(Margin_left+26, Margin_top+Drawing_padding_top+44)App.mouse_move(Editor_state.margin_left+26, Editor_state.margin_top+Editor_state.drawing_padding_top+44) - replacement in drawing_tests.lua at line 457
App.run_after_mouse_click(Margin_left+26, Margin_top+Drawing_padding_top+44, 1)check_eq(Current_drawing_mode, 'line', 'F - test_move_point/mode:3')App.run_after_mouse_click(Editor_state.margin_left+26, Editor_state.margin_top+Editor_state.drawing_padding_top+44, 1)check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_move_point/mode:3') - replacement in drawing_tests.lua at line 464
Lines = load_from_disk(Filename)local p2 = Lines[1].points[drawing.shapes[1].p2]Editor_state.lines = load_from_disk(Editor_state.filename)local p2 = Editor_state.lines[1].points[drawing.shapes[1].p2] - replacement in drawing_tests.lua at line 473[20.154]→[20.154:173](∅→∅),[20.173]→[20.5810:5904](∅→∅),[20.3470]→[20.226:270](∅→∅),[20.5904]→[20.226:270](∅→∅),[20.226]→[20.226:270](∅→∅),[20.1119]→[20.329:366](∅→∅),[20.329]→[20.329:366](∅→∅)
Filename = 'foo'App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'manhattan'Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'manhattan' - replacement in drawing_tests.lua at line 478
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+46, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+46, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 487
check_eq(Current_drawing_mode, 'move', 'F - test_move_point_on_manhattan_line/mode:1')check_eq(Editor_state.current_drawing_mode, 'move', 'F - test_move_point_on_manhattan_line/mode:1') - replacement in drawing_tests.lua at line 489
App.mouse_move(Margin_left+26, Margin_top+Drawing_padding_top+44)App.mouse_move(Editor_state.margin_left+26, Editor_state.margin_top+Editor_state.drawing_padding_top+44) - replacement in drawing_tests.lua at line 498[20.158]→[20.681:700](∅→∅),[20.700]→[20.5905:5999](∅→∅),[20.3564]→[20.211:255](∅→∅),[20.5999]→[20.211:255](∅→∅),[20.211]→[20.211:255](∅→∅),[20.1191]→[20.314:346](∅→∅),[20.314]→[20.314:346](∅→∅)
Filename = 'foo'App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 503
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_release(Margin_left+55, Margin_top+Drawing_padding_top+26, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)App.run_after_mouse_press(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)App.run_after_mouse_release(Editor_state.margin_left+55, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 512
App.mouse_move(Margin_left+35, Margin_top+Drawing_padding_top+36)App.mouse_move(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36) - replacement in drawing_tests.lua at line 520
Lines = load_from_disk(Filename)check_eq(#Lines[1].shapes, 0, 'F - test_delete_lines_at_point/save')Editor_state.lines = load_from_disk(Editor_state.filename)check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_delete_lines_at_point/save') - replacement in drawing_tests.lua at line 527[20.1468]→[20.6000:6094](∅→∅),[20.3658]→[20.1521:1565](∅→∅),[20.6094]→[20.1521:1565](∅→∅),[20.1521]→[20.1521:1565](∅→∅),[20.1263]→[20.1624:1656](∅→∅),[20.1624]→[20.1624:1656](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 531
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_release(Margin_left+55, Margin_top+Drawing_padding_top+26, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)App.run_after_mouse_press(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)App.run_after_mouse_release(Editor_state.margin_left+55, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 540
App.mouse_move(Margin_left+25, Margin_top+Drawing_padding_top+26)App.mouse_move(Editor_state.margin_left+25, Editor_state.margin_top+Editor_state.drawing_padding_top+26) - replacement in drawing_tests.lua at line 550[20.2844]→[20.6095:6189](∅→∅),[20.3752]→[20.2897:2941](∅→∅),[20.6189]→[20.2897:2941](∅→∅),[20.2897]→[20.2897:2941](∅→∅),[20.1335]→[20.3000:3032](∅→∅),[20.3000]→[20.3000:3032](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 555
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1) - replacement in drawing_tests.lua at line 558
App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+36)App.mouse_move(Editor_state.margin_left+65, Editor_state.margin_top+Editor_state.drawing_padding_top+36) - replacement in drawing_tests.lua at line 561
App.mouse_move(Margin_left+35, Margin_top+Drawing_padding_top+26)App.mouse_move(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+26) - replacement in drawing_tests.lua at line 564
App.run_after_mouse_release(Margin_left+14, Margin_top+Drawing_padding_top+16, 1)local drawing = Lines[1]App.run_after_mouse_release(Editor_state.margin_left+14, Editor_state.margin_top+Editor_state.drawing_padding_top+16, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 570
App.mouse_move(Margin_left+35, Margin_top+Drawing_padding_top+26)App.mouse_move(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+26) - replacement in drawing_tests.lua at line 580[20.4357]→[20.6190:6284](∅→∅),[20.3846]→[20.4410:4454](∅→∅),[20.6284]→[20.4410:4454](∅→∅),[20.4410]→[20.4410:4454](∅→∅),[20.1407]→[20.4513:4545](∅→∅),[20.4513]→[20.4513:4545](∅→∅)
App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 585
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1) - replacement in drawing_tests.lua at line 588
App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+36)App.mouse_move(Editor_state.margin_left+65, Editor_state.margin_top+Editor_state.drawing_padding_top+36) - replacement in drawing_tests.lua at line 591
App.run_after_mouse_release(Margin_left+14, Margin_top+Drawing_padding_top+16, 1)local drawing = Lines[1]App.run_after_mouse_release(Editor_state.margin_left+14, Editor_state.margin_top+Editor_state.drawing_padding_top+16, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 597
App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+36)App.mouse_move(Editor_state.margin_left+65, Editor_state.margin_top+Editor_state.drawing_padding_top+36) - replacement in drawing_tests.lua at line 606[20.192]→[20.192:211](∅→∅),[20.211]→[20.6285:6379](∅→∅),[20.3940]→[20.264:308](∅→∅),[20.6379]→[20.264:308](∅→∅),[20.264]→[20.264:308](∅→∅),[20.1479]→[20.367:399](∅→∅),[20.367]→[20.367:399](∅→∅)
Filename = 'foo'App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 612
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 625
check_eq(#History, 1, 'F - test_undo_name_point/baseline/history:1')check_eq(#Editor_state.history, 1, 'F - test_undo_name_point/baseline/history:1') - replacement in drawing_tests.lua at line 631
check_eq(#History, 3, 'F - test_undo_name_point/baseline/history:2')check_eq(Next_history, 4, 'F - test_undo_name_point/baseline/next_history')check_eq(#Editor_state.history, 3, 'F - test_undo_name_point/baseline/history:2')check_eq(Editor_state.next_history, 4, 'F - test_undo_name_point/baseline/next_history') - replacement in drawing_tests.lua at line 635
local drawing = Lines[1]local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 637
check_eq(Next_history, 3, 'F - test_undo_name_point/next_history')check_eq(Editor_state.next_history, 3, 'F - test_undo_name_point/next_history') - replacement in drawing_tests.lua at line 643
Lines = load_from_disk(Filename)local p2 = Lines[1].points[drawing.shapes[1].p2]Editor_state.lines = load_from_disk(Editor_state.filename)local p2 = Editor_state.lines[1].points[drawing.shapes[1].p2] - replacement in drawing_tests.lua at line 651[20.118]→[20.118:137](∅→∅),[20.137]→[20.6380:6474](∅→∅),[20.4034]→[20.190:234](∅→∅),[20.6474]→[20.190:234](∅→∅),[20.190]→[20.190:234](∅→∅),[20.1551]→[20.293:325](∅→∅),[20.293]→[20.293:325](∅→∅)
Filename = 'foo'App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 656
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 671
App.mouse_move(Margin_left+26, Margin_top+Drawing_padding_top+44)App.mouse_move(Editor_state.margin_left+26, Editor_state.margin_top+Editor_state.drawing_padding_top+44) - replacement in drawing_tests.lua at line 677
App.run_after_mouse_click(Margin_left+26, Margin_top+Drawing_padding_top+44, 1)check_eq(Next_history, 4, 'F - test_undo_move_point/next_history')App.run_after_mouse_click(Editor_state.margin_left+26, Editor_state.margin_top+Editor_state.drawing_padding_top+44, 1)check_eq(Editor_state.next_history, 4, 'F - test_undo_move_point/next_history') - replacement in drawing_tests.lua at line 682
local drawing = Lines[1]local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 684
check_eq(Next_history, 2, 'F - test_undo_move_point/next_history')check_eq(Editor_state.next_history, 2, 'F - test_undo_move_point/next_history') - replacement in drawing_tests.lua at line 691
Lines = load_from_disk(Filename)local p2 = Lines[1].points[drawing.shapes[1].p2]Editor_state.lines = load_from_disk(Editor_state.filename)local p2 = Editor_state.lines[1].points[drawing.shapes[1].p2] - replacement in drawing_tests.lua at line 700[20.190]→[20.190:209](∅→∅),[20.209]→[20.6475:6569](∅→∅),[20.4128]→[20.262:306](∅→∅),[20.6569]→[20.262:306](∅→∅),[20.262]→[20.262:306](∅→∅),[20.1623]→[20.365:397](∅→∅),[20.365]→[20.365:397](∅→∅)
Filename = 'foo'App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsLines = load_array{'```lines', '```', ''}Current_drawing_mode = 'line'Editor_state.filename = 'foo'App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state.lines = load_array{'```lines', '```', ''}Editor_state.current_drawing_mode = 'line' - replacement in drawing_tests.lua at line 705
App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)App.run_after_mouse_release(Margin_left+55, Margin_top+Drawing_padding_top+26, 1)local drawing = Lines[1]App.run_after_mouse_press(Editor_state.margin_left+5, Editor_state.margin_top+Editor_state.drawing_padding_top+6, 1)App.run_after_mouse_release(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)App.run_after_mouse_press(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36, 1)App.run_after_mouse_release(Editor_state.margin_left+55, Editor_state.margin_top+Editor_state.drawing_padding_top+26, 1)local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 714
App.mouse_move(Margin_left+35, Margin_top+Drawing_padding_top+36)App.mouse_move(Editor_state.margin_left+35, Editor_state.margin_top+Editor_state.drawing_padding_top+36) - replacement in drawing_tests.lua at line 720
local drawing = Lines[1]local drawing = Editor_state.lines[1] - replacement in drawing_tests.lua at line 722
check_eq(Next_history, 3, 'F - test_undo_move_point/next_history')check_eq(Editor_state.next_history, 3, 'F - test_undo_move_point/next_history') - replacement in drawing_tests.lua at line 729
Lines = load_from_disk(Filename)check_eq(#Lines[1].shapes, 2, 'F - test_undo_delete_point/save')Editor_state.lines = load_from_disk(Editor_state.filename)check_eq(#Editor_state.lines[1].shapes, 2, 'F - test_undo_delete_point/save') - replacement in drawing.lua at line 9
if pmx < App.screen.width-Margin_right and pmy > line.y and pmy < line.y+Drawing.pixels(line.h) thenif pmx < App.screen.width-Editor_state.margin_right and pmy > line.y and pmy < line.y+Drawing.pixels(line.h) then - replacement in drawing.lua at line 11[17.1052]→[20.6675:6785](∅→∅),[20.359]→[20.6675:6785](∅→∅),[20.486]→[20.18445:18484](∅→∅),[20.1813]→[20.18445:18484](∅→∅),[20.2856]→[20.18445:18484](∅→∅),[20.4330]→[20.18445:18484](∅→∅),[20.6785]→[20.18445:18484](∅→∅),[20.18445]→[20.18445:18484](∅→∅),[20.18484]→[20.6786:6863](∅→∅)
love.graphics.rectangle('line', Margin_left,line.y, App.screen.width-Margin_width,Drawing.pixels(line.h))if icon[Current_drawing_mode] thenicon[Current_drawing_mode](App.screen.width-Margin_right-22, line.y+4)love.graphics.rectangle('line', Editor_state.margin_left,line.y, App.screen.width-Editor_state.margin_width,Drawing.pixels(line.h))if icon[Editor_state.current_drawing_mode] thenicon[Editor_state.current_drawing_mode](App.screen.width-Editor_state.margin_right-22, line.y+4) - replacement in drawing.lua at line 15
icon[Previous_drawing_mode](App.screen.width-Margin_right-22, line.y+4)icon[Editor_state.previous_drawing_mode](App.screen.width-Editor_state.margin_right-22, line.y+4) - replacement in drawing.lua at line 29
local mx,my = Drawing.coord(pmx-Margin_left), Drawing.coord(pmy-line.y)local mx,my = Drawing.coord(pmx-Editor_state.margin_left), Drawing.coord(pmy-line.y) - replacement in drawing.lua at line 38
Drawing.draw_shape(Margin_left,line.y, line, shape)Drawing.draw_shape(Editor_state.margin_left,line.y, line, shape) - replacement in drawing.lua at line 44
love.graphics.circle('line', Drawing.pixels(p.x)+Margin_left,Drawing.pixels(p.y)+line.y, 4)love.graphics.circle('line', Drawing.pixels(p.x)+Editor_state.margin_left,Drawing.pixels(p.y)+line.y, 4) - replacement in drawing.lua at line 47
love.graphics.circle('fill', Drawing.pixels(p.x)+Margin_left,Drawing.pixels(p.y)+line.y, 2)love.graphics.circle('fill', Drawing.pixels(p.x)+Editor_state.margin_left,Drawing.pixels(p.y)+line.y, 2) - replacement in drawing.lua at line 51
local x,y = Drawing.pixels(p.x)+Margin_left+5, Drawing.pixels(p.y)+line.y+5local x,y = Drawing.pixels(p.x)+Editor_state.margin_left+5, Drawing.pixels(p.y)+line.y+5 - replacement in drawing.lua at line 53
if Current_drawing_mode == 'name' and i == line.pending.target_point thenif Editor_state.current_drawing_mode == 'name' and i == line.pending.target_point then - replacement in drawing.lua at line 59
name_text = Emname_text = Editor_state.em - replacement in drawing.lua at line 63
love.graphics.rectangle('fill', x,y, App.width(name_text), Line_height)love.graphics.rectangle('fill', x,y, App.width(name_text), Editor_state.line_height) - replacement in drawing.lua at line 69
Drawing.draw_pending_shape(Margin_left,line.y, line)Drawing.draw_pending_shape(Editor_state.margin_left,line.y, line) - replacement in drawing.lua at line 207
return y >= drawing.y and y < drawing.y + Drawing.pixels(drawing.h) and x >= Margin_left and x < App.screen.width-Margin_rightreturn y >= drawing.y and y < drawing.y + Drawing.pixels(drawing.h) and x >= Editor_state.margin_left and x < App.screen.width-Editor_state.margin_right - replacement in drawing.lua at line 211[20.676]→[20.853:898](∅→∅),[20.8284]→[20.853:898](∅→∅),[20.853]→[20.853:898](∅→∅),[20.898]→[20.3475:3598](∅→∅),[20.3598]→[20.1012:1096](∅→∅),[20.1012]→[20.1012:1096](∅→∅),[20.1096]→[20.3599:3708](∅→∅),[20.3708]→[20.1196:1252](∅→∅),[20.1196]→[20.1196:1252](∅→∅),[20.1252]→[20.4062:4185](∅→∅),[20.4185]→[20.3709:3818](∅→∅),[20.3818]→[20.1400:1511](∅→∅),[20.1400]→[20.1400:1511](∅→∅),[20.1511]→[20.3819:3928](∅→∅),[20.3928]→[20.1611:1671](∅→∅),[20.1611]→[20.1611:1671](∅→∅),[20.1671]→[20.193:238](∅→∅)
if Current_drawing_mode == 'freehand' thendrawing.pending = {mode=Current_drawing_mode, points={{x=Drawing.coord(x-Margin_left), y=Drawing.coord(y-drawing.y)}}}elseif Current_drawing_mode == 'line' or Current_drawing_mode == 'manhattan' thenlocal j = Drawing.insert_point(drawing.points, Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y))drawing.pending = {mode=Current_drawing_mode, p1=j}elseif Current_drawing_mode == 'polygon' or Current_drawing_mode == 'rectangle' or Current_drawing_mode == 'square' thenlocal j = Drawing.insert_point(drawing.points, Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y))drawing.pending = {mode=Current_drawing_mode, vertices={j}}elseif Current_drawing_mode == 'circle' thenlocal j = Drawing.insert_point(drawing.points, Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y))drawing.pending = {mode=Current_drawing_mode, center=j}elseif Current_drawing_mode == 'move' thenif Editor_state.current_drawing_mode == 'freehand' thendrawing.pending = {mode=Editor_state.current_drawing_mode, points={{x=Drawing.coord(x-Editor_state.margin_left), y=Drawing.coord(y-drawing.y)}}}elseif Editor_state.current_drawing_mode == 'line' or Editor_state.current_drawing_mode == 'manhattan' thenlocal j = Drawing.insert_point(drawing.points, Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y))drawing.pending = {mode=Editor_state.current_drawing_mode, p1=j}elseif Editor_state.current_drawing_mode == 'polygon' or Editor_state.current_drawing_mode == 'rectangle' or Editor_state.current_drawing_mode == 'square' thenlocal j = Drawing.insert_point(drawing.points, Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y))drawing.pending = {mode=Editor_state.current_drawing_mode, vertices={j}}elseif Editor_state.current_drawing_mode == 'circle' thenlocal j = Drawing.insert_point(drawing.points, Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y))drawing.pending = {mode=Editor_state.current_drawing_mode, center=j}elseif Editor_state.current_drawing_mode == 'move' then - replacement in drawing.lua at line 224
elseif Current_drawing_mode == 'name' thenelseif Editor_state.current_drawing_mode == 'name' then - replacement in drawing.lua at line 227
print(Current_drawing_mode)print(Editor_state.current_drawing_mode) - replacement in drawing.lua at line 234
if Lines.current_drawing == nil then return endlocal drawing = Lines.current_drawingif Editor_state.lines.current_drawing == nil then return endlocal drawing = Editor_state.lines.current_drawing - replacement in drawing.lua at line 241
table.insert(drawing.pending.points, {x=Drawing.coord(App.mouse_x()-Margin_left), y=Drawing.coord(App.mouse_y()-drawing.y)})table.insert(drawing.pending.points, {x=Drawing.coord(App.mouse_x()-Editor_state.margin_left), y=Drawing.coord(App.mouse_y()-drawing.y)}) - replacement in drawing.lua at line 243
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 249
elseif Current_drawing_mode == 'move' thenelseif Editor_state.current_drawing_mode == 'move' then - replacement in drawing.lua at line 251
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 280
if Current_drawing_mode == 'move' thenCurrent_drawing_mode = Previous_drawing_modePrevious_drawing_mode = nilif Lines.current_drawing thenLines.current_drawing.pending = {}Lines.current_drawing = nilif Editor_state.current_drawing_mode == 'move' thenEditor_state.current_drawing_mode = Editor_state.previous_drawing_modeEditor_state.previous_drawing_mode = nilif Editor_state.lines.current_drawing thenEditor_state.lines.current_drawing.pending = {}Editor_state.lines.current_drawing = nil - replacement in drawing.lua at line 287
elseif Lines.current_drawing thenlocal drawing = Lines.current_drawingelseif Editor_state.lines.current_drawing thenlocal drawing = Editor_state.lines.current_drawing - replacement in drawing.lua at line 297
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 304
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 312
App.mouse_move(Margin_left+Drawing.pixels(p2.x), drawing.y+Drawing.pixels(p2.y))App.mouse_move(Editor_state.margin_left+Drawing.pixels(p2.x), drawing.y+Drawing.pixels(p2.y)) - replacement in drawing.lua at line 316
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 324
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 339
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 350
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 357
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 369
Lines.current_drawing.pending = {}Lines.current_drawing = nilEditor_state.lines.current_drawing.pending = {}Editor_state.lines.current_drawing = nil - replacement in drawing.lua at line 377[20.160]→[20.5820:5858](∅→∅),[20.1665]→[20.5820:5858](∅→∅),[20.2625]→[20.5820:5858](∅→∅),[20.8612]→[20.5820:5858](∅→∅),[20.5820]→[20.5820:5858](∅→∅)
Current_drawing_mode = 'freehand'Editor_state.current_drawing_mode = 'freehand' - replacement in drawing.lua at line 379
Current_drawing_mode = 'line'Editor_state.current_drawing_mode = 'line' - replacement in drawing.lua at line 390
Current_drawing_mode = 'line'Editor_state.current_drawing_mode = 'line' - replacement in drawing.lua at line 392
Current_drawing_mode = 'manhattan'Editor_state.current_drawing_mode = 'manhattan' - replacement in drawing.lua at line 405
Current_drawing_mode = 'manhattan'Editor_state.current_drawing_mode = 'manhattan' - replacement in drawing.lua at line 407
Current_drawing_mode = 'polygon'Editor_state.current_drawing_mode = 'polygon' - replacement in drawing.lua at line 409
Current_drawing_mode = 'polygon'Editor_state.current_drawing_mode = 'polygon' - replacement in drawing.lua at line 424
Current_drawing_mode = 'rectangle'Editor_state.current_drawing_mode = 'rectangle' - replacement in drawing.lua at line 426
Current_drawing_mode = 'rectangle'Editor_state.current_drawing_mode = 'rectangle' - replacement in drawing.lua at line 441
Current_drawing_mode = 'square'Editor_state.current_drawing_mode = 'square' - replacement in drawing.lua at line 443
Current_drawing_mode = 'square'Editor_state.current_drawing_mode = 'square' - replacement in drawing.lua at line 461
elseif App.mouse_down(1) and chord == 'p' and Current_drawing_mode == 'polygon' thenelseif App.mouse_down(1) and chord == 'p' and Editor_state.current_drawing_mode == 'polygon' then - replacement in drawing.lua at line 463
local mx,my = Drawing.coord(App.mouse_x()-Margin_left), Drawing.coord(App.mouse_y()-drawing.y)local mx,my = Drawing.coord(App.mouse_x()-Editor_state.margin_left), Drawing.coord(App.mouse_y()-drawing.y) - replacement in drawing.lua at line 466
elseif App.mouse_down(1) and chord == 'p' and (Current_drawing_mode == 'rectangle' or Current_drawing_mode == 'square') thenelseif App.mouse_down(1) and chord == 'p' and (Editor_state.current_drawing_mode == 'rectangle' or Editor_state.current_drawing_mode == 'square') then - replacement in drawing.lua at line 468
local mx,my = Drawing.coord(App.mouse_x()-Margin_left), Drawing.coord(App.mouse_y()-drawing.y)local mx,my = Drawing.coord(App.mouse_x()-Editor_state.margin_left), Drawing.coord(App.mouse_y()-drawing.y) - replacement in drawing.lua at line 475[20.246]→[20.7052:7088](∅→∅),[20.2204]→[20.7052:7088](∅→∅),[20.3271]→[20.7052:7088](∅→∅),[20.7052]→[20.7052:7088](∅→∅),[20.7088]→[20.2205:2291](∅→∅)
Current_drawing_mode = 'circle'elseif App.mouse_down(1) and chord == 'a' and Current_drawing_mode == 'circle' thenEditor_state.current_drawing_mode = 'circle'elseif App.mouse_down(1) and chord == 'a' and Editor_state.current_drawing_mode == 'circle' then - replacement in drawing.lua at line 479
local mx,my = Drawing.coord(App.mouse_x()-Margin_left), Drawing.coord(App.mouse_y()-drawing.y)local mx,my = Drawing.coord(App.mouse_x()-Editor_state.margin_left), Drawing.coord(App.mouse_y()-drawing.y) - replacement in drawing.lua at line 484[20.301]→[20.7662:7698](∅→∅),[20.2341]→[20.7662:7698](∅→∅),[20.3503]→[20.7662:7698](∅→∅),[20.7662]→[20.7662:7698](∅→∅)
Current_drawing_mode = 'circle'Editor_state.current_drawing_mode = 'circle' - replacement in drawing.lua at line 497
if Previous_drawing_mode == nil thenPrevious_drawing_mode = Current_drawing_modeif Editor_state.previous_drawing_mode == nil thenEditor_state.previous_drawing_mode = Editor_state.current_drawing_mode - replacement in drawing.lua at line 500[20.117]→[20.10223:10259](∅→∅),[20.10223]→[20.10223:10259](∅→∅),[20.10259]→[20.1947:2037](∅→∅),[20.2037]→[20.87:137](∅→∅),[20.10327]→[20.87:137](∅→∅),[20.137]→[20.381:419](∅→∅),[20.10327]→[20.381:419](∅→∅)
Current_drawing_mode = 'move'drawing.pending = {mode=Current_drawing_mode, target_point=p, target_point_index=i}Lines.current_drawing_index = drawing_indexLines.current_drawing = drawingEditor_state.current_drawing_mode = 'move'drawing.pending = {mode=Editor_state.current_drawing_mode, target_point=p, target_point_index=i}Editor_state.lines.current_drawing_index = drawing_indexEditor_state.lines.current_drawing = drawing - replacement in drawing.lua at line 508
if Previous_drawing_mode == nil thenif Editor_state.previous_drawing_mode == nil then - replacement in drawing.lua at line 510
Previous_drawing_mode = Current_drawing_modeEditor_state.previous_drawing_mode = Editor_state.current_drawing_mode - replacement in drawing.lua at line 512
Current_drawing_mode = 'name'Editor_state.current_drawing_mode = 'name' - replacement in drawing.lua at line 514[20.2077]→[20.2077:2155](∅→∅),[20.2155]→[20.341:391](∅→∅),[20.391]→[20.459:497](∅→∅),[20.2155]→[20.459:497](∅→∅)
drawing.pending = {mode=Current_drawing_mode, target_point=point_index}Lines.current_drawing_index = drawing_indexLines.current_drawing = drawingdrawing.pending = {mode=Editor_state.current_drawing_mode, target_point=point_index}Editor_state.lines.current_drawing_index = drawing_indexEditor_state.lines.current_drawing = drawing - replacement in drawing.lua at line 602
for drawing_index,drawing in ipairs(Lines) dofor drawing_index,drawing in ipairs(Editor_state.lines) do - replacement in drawing.lua at line 613
for _,drawing in ipairs(Lines) dofor _,drawing in ipairs(Editor_state.lines) do - replacement in drawing.lua at line 617
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 630
for drawing_index,drawing in ipairs(Lines) dofor drawing_index,drawing in ipairs(Editor_state.lines) do - replacement in drawing.lua at line 634
local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y) - replacement in drawing.lua at line 647
for _,drawing in ipairs(Lines) dofor _,drawing in ipairs(Editor_state.lines) do - replacement in drawing.lua at line 703
return (cx-px)*(cx-px) + (cy-py)*(cy-py) < Margin_leftreturn (cx-px)*(cx-px) + (cy-py)*(cy-py) < Editor_state.margin_left - replacement in drawing.lua at line 707
return math.floor(n*(App.screen.width-Margin_width)/256)return math.floor(n*(App.screen.width-Editor_state.margin_width)/256) - replacement in drawing.lua at line 710
return math.floor(n*256/(App.screen.width-Margin_width))return math.floor(n*256/(App.screen.width-Editor_state.margin_width))