group all editor globals

[?]
Jul 12, 2022, 9:18 PM
LF7BWEG4DKQI7NMXMZC4LC2BE5PB42HK5PD6OYBNIDMAZBJASOKQC

Dependencies

  • [2] CLRJI4QK bugfix: backspace from start of file
  • [3] VO3GEIRW use app name in window title
  • [4] GSPXUEQO .
  • [5] NVSWVPW5 move
  • [6] KICO5EE5 typos
  • [7] VA2ZYFFF better fix for commit 3ffc2ed8f
  • [8] 7LVK4KRD fix a failing test
  • [9] 5UG5PQ6K undo commit 861c57b533
  • [10] YT5P6TO6 bugfix: save previous file when dropping a new one on
  • [11] 5MR22SGZ bugfix: enable resize when loading settings
  • [12] G5HANZBI bugfix
  • [13] 2LOQ5ALJ add args to some functions
  • [14] T57DTBX6 add args to some functions
  • [15] 5OALPNN3 add args to some functions
  • [16] UV4EWOLY add args to some functions
  • [17] 4KC7I3E2 make colors easier to edit
  • [18] 2JLVAYHB start decoupling editor tests from App
  • [19] 3QQZ7W4E bring couple more globals back to the app level
  • [20] WTDKUACN rectangle and square shapes
  • [21] 42LVB4DE test: naming a point
  • [22] CAMMFOJ4 make cursor more obvious
  • [23] AH744RFR show when we're naming a point
  • [24] BPWFKBXT new test: dragging and dropping a file on lines.love
  • [25] JY4VK7L2 rename
  • [26] 4VKEE43Z bugfix
  • [27] YLKLDF4R .
  • [28] BJ2C6F2B ignore 'name' mode in a few places
  • [29] NQWWTGXR switch undo/redo to ctrl- hotkeys
  • [30] KAUD3YIK tests: deleting points/shapes
  • [31] VIU2FBNV make sure to save right when quitting
  • [32] EWMPYCDO bugfix
  • [33] 5DOC2CBM extract a function
  • [34] YJJ4X4JG bugfix: avoid scrolling on 'end'
  • [35] 3TFEAQSW start using some globals
  • [36] VHQCNMAR several more modules
  • [37] AJB4LFRB try to maintain a reasonable line width
  • [38] OGUV4HSA remove some memory leaks from rendered fragments
  • [39] 6UZ2JNZE yet another key conflict
  • [40] YTSPVDZH first successful pagedown test, first bug found by test
  • [41] AOIRVVJA revert selection logic to before commit 3ffc2ed8f
  • [42] 65HNIAOS make freehand drawings smoother
  • [43] AJP4OSTJ new test
  • [44] PYGMASTV disable some debug prints
  • [45] PR4KIAZD first stab at equally hacky cursor down support
  • [46] PFT5Y2ZY move
  • [47] Z4XRNDTR find text
  • [48] PWHZPJJM always show current filename in window title
  • [49] NHA7RUFI move current mode indicator slightly
  • [50] BULPIBEG beginnings of a module for the text editor
  • [51] AVFRVNFR better handle moving points
  • [52] S2YQBEYC snapshot: test for a new regression
  • [53] DSLD74DK lots more tests
  • [54] YCDYGEZU include drawing index in a few places
  • [55] 4J2L6JMR bugfix: deleting a selection spanning pages
  • [56] 7DPPMI2U another integer coordinate
  • [57] FFBIY74N bugfix: 'escape' to cancel a stroke
  • [58] 7M7LS7I2 start saving some settings to disk on quit
  • [59] CE4LZV4T drop last couple of manual tests
  • [60] RT6EV6OP delegate update events to drawings
  • [61] CBPV5SSI stop handling nil screen_line_starting_pos everywhere
  • [62] RMKMPFT5 fix a corner case when selecting text
  • [63] ULKLJBN6 couple of renames
  • [64] YIQYNVD2 rip out the line-width slider
  • [65] A2NV3WVO scrolling with up arrow
  • [66] BLWAYPKV extract a module
  • [67] O6T3TPXD bugfix: position cursor up top when loading file
  • [68] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [69] HTWAM4NZ bugfix: scrolling in left/right movements
  • [70] 65XHTZEK regression: couldn't do many drawing operations because line.y was reset
  • [71] VVXVV2D2 change data model; text can now have metadata
  • [72] B3IWYWSR delete another arg that can be deduced
  • [73] 3GFQP6IR stop saving the entire file when modifying drawings
  • [74] QKAMUWSB another bugfix in scrolling while inserting text
  • [75] KZ5GAYRP this fixes the immediate regression
  • [76] CCYSVZA2 bugfix: BSOD in #4.
  • [77] WY3JD6W6 bugfix
  • [78] DAENUOGV eliminate assumptions that line length == size in bytes
  • [79] SQLVYKVJ rename
  • [80] Y2ZIPXEM new test
  • [81] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [82] EBBFOW4X bugfix: clear selection in a couple more places
  • [83] 7CLGG7J2 test: autosave after any shape
  • [84] S7ZZA3YE ugh, handle absolute as well as relative paths
  • [85] 7Q6GKOOL .
  • [86] GN3IF4WF bugfix: pasting newlines
  • [87] 2ZYV7D3W handle tab characters
  • [88] 7EQLPB3O bugfix: don't delete selection when moving cursor
  • [89] 2CH77LZC add args to some functions
  • [90] 2MA33THZ few more transitions between shapes
  • [91] NQKFQSZE undo creating new drawings
  • [92] CVGE3SIG I feel confident now that page-down is working.
  • [93] NUCZBE77 bugfix: alignment of help screen
  • [94] GJLOKCYK bugfix: clicking past end of screen line
  • [95] UYRAO73Y enable pressing and holding backspace
  • [96] 2LC3BM2N support other whitespace chars in word movements
  • [97] XSLCFVFH .
  • [98] LYN3L74W correct commit f3abc2cbf2
  • [99] QYIFOHW3 first test!
  • [100] K464QQR4 more defensive resize handling
  • [101] U7M4M2F7 bugfix: don't rely on Screen_bottom1 while scrolling
  • [102] TRNWIQN6 more precise height calculation when scrolling up as much as possible while keeping cursor on screen
  • [103] V3EABA35 skip multiple consecutive whitespace
  • [104] BTKAW76L rename
  • [105] 4AXV2HG4 all pending manual tests done!
  • [106] W4UVZETR 2 regressions:
  • [107] HOSPP2AN crisp font rendering
  • [108] AMSESRTH move some code
  • [109] F3OOGMME switch freehand hotkey to eliminate conflict with search
  • [110] WSXSEZQ2 switch circles to 'o' to avoid conflicting with copy
  • [111] CPZGQT72 go through and fix similar issues
  • [112] X75QPYVW move Selection1 clearing past business logic
  • [113] SVJZZDC3 snapshot - no, that's all wrong
  • [114] 73OCE2MC after much struggle, a brute-force undo
  • [115] YGCT2D2O start loading settings as applicable
  • [116] LXTTOB33 extract a couple of files
  • [117] 4QQBMWLL regression: typing uppercase letters in text
  • [118] L6XA5EY2 test: moving a point
  • [119] WLHI7KD3 new globals: draw partial screen line up top
  • [120] KOYAJWE4 extract a couple more methods
  • [121] GGJEDJOO add args to some functions
  • [122] 4KOI3E6R remove some redundant checks
  • [123] VJ77YABH more efficient undo/redo
  • [124] GSV7DABC make online help fit within a drawing
  • [125] FHSZYAZ2 more precise search highlighting
  • [126] 6DE7RBZ6 move mouse_released events to Drawing
  • [127] BYG5CEMV support for naming points
  • [128] ESETRNLB bugfix: printing the first part of a line at the bottom made it seem non-wrapping
  • [129] HIKLULFQ extract a function
  • [130] 5DOTWNVM right margin
  • [131] PHFWIFYK scroll on enter
  • [132] QCQTMUZ7 add args to some functions
  • [133] DHI6IJCN selecting text and deleting selections
  • [134] C45WCXJ2 keep drawings within the line width slider as well
  • [135] O7QH4N4W speeding up copy, attempt 1
  • [136] SLLR6KKI bugfix for non-ASCII
  • [137] M6TH7VSZ rip out notion of Line_width
  • [138] CVSRHMJ2 experiment: slightly adaptive scrolling
  • [139] Z4KNS42N to open a file without a terminal, drag it on!
  • [140] NYQ7HD4D move
  • [141] SRVDX4I5 local var
  • [142] DRFE3B3Z mouse buttons are integers, not strings
  • [143] WAR3HXHT test both ways of selecting text with mouse
  • [144] AD34IX2Z couple more tests
  • [145] GK47BBCY start passing left/right margins everywhere
  • [146] UZVWYRTY missing temporary modes in a couple more places
  • [147] LERERVPH keep one screen line of overlap on pagedown
  • [148] GCEF4N3V stop repeatedly checking for line wrapping
  • [149] PLKNHYZ4 extract a function
  • [150] 2POFQQLW keep cursor on screen when pressing 'down'
  • [151] AM42E4Y6 avoid redundant writes on exit
  • [152] H22OAXWE couple of TODOs
  • [153] QGO66DNK initialize screen width to something reasonable
  • [154] 3TCZ7ADH move
  • [155] BU3LUPY3 bugfix in help
  • [156] 2TQR4PSY add args to some functions
  • [157] 7DYUAOI6 test: undo moving point
  • [158] 6LIPEQ5I more robust transitions to temporary modes
  • [159] YJGADSGK delete unused arg
  • [160] FT3ZSQBC answered an open question
  • [161] T7SJSJIH test: undo naming a point
  • [162] OIB2QPRC start remembering where the cursor is drawn in px
  • [163] IWYLK45K clicking to the right of a line within line width
  • [164] HFI2YR2C rip out geometry commandline arg
  • [165] K2X6G75Z start writing some tests for drawings
  • [166] ZHLO7K3M add args to some functions
  • [167] 62PZGSUC optimization: moving cursor to next word
  • [168] WPW3AVFS more precise shape selection
  • [169] MYC7XR5Q bugfix: lines that aren't drawn from the start
  • [170] QLTJG7Q3 indent
  • [171] NZKYPBSK check for scroll when just typing
  • [172] AIRIP35Z cleaner
  • [173] WQOSZSUE warn on unused commandline args
  • [174] AQQQNDTL yet another bugfix in selection management
  • [175] T3B4NLV3 include a unit test
  • [176] KECEMMMR extract couple of functions
  • [177] R53OF3ON one bug I've repeatedly run into while testing with Moby Dick
  • [178] FYS7TCDW bugfix
  • [179] K4OBZSHE add args to some functions
  • [180] 537TQ2QN some more logging
  • [181] Y36LOGR5 bugfix: show cursor when past end of line
  • [182] EMHRPJ3R no, that's not right
  • [183] JRGTJ2IW quite the frustrating bugfix
  • [184] LAW2O3NW extract variable Margin_left
  • [185] AVTNUQYR basic test-enabled framework
  • [186] 5T2E3PDV couple of bugfixes to file-handling
  • [187] CG3264MM move
  • [188] HMODUNJE scroll on backspace
  • [189] 5L7K4GBD clicking to the right of a wrapped line
  • [190] DWZK32YD include CWD when saving filename
  • [191] XDB5D7H7 some early returns should be asserts
  • [192] MGOQ5XAV start uppercasing globals
  • [193] AVQ5MC5D finish uppercasing all globals
  • [194] R6GUSTBY default font size and line-height
  • [195] VG75U7IM bugfix: typing should delete highlighted text
  • [196] KMRJOSLY bugfix: delete selection before pasting
  • [197] UFIUYYYV additional logging for an active bug
  • [198] DXT4QTAH a few more integer coordinates
  • [199] EMRPLZPW drop an arg from a function
  • [200] ZLJGZYQG select text with shift + mouseclick
  • [201] H3ECRBXF bugfix: clicking on empty lines
  • [202] WIPDCP4U stop recording points for arcs
  • [203] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [204] LS55YKGW switch copy/paste to ctrl- hotkeys
  • [205] 253TWKDA clean up
  • [206] OMTGHWMA yet another bugfix. But for how long?
  • [207] 2H67P75X switch arg for a function
  • [208] C6QTJYA4 keep online help inside of drawing
  • [209] WOXIYUTL bugfix: manage screen_top and cursor when resizing
  • [210] LUNH47XX make text and drawings the same width
  • [211] OWK3U6VD tests for drawing polygons
  • [212] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [213] 7SFHSB47 rename
  • [214] CUIV2LE5 some typos
  • [215] RF5ALVNY allow the window to be resized
  • [216] JJ7J4PUB some unnecessary mutations
  • [217] CTJ3IZGS add args to some functions
  • [218] 3RGHOJ25 DRY some code
  • [219] 7NQCCB34 .
  • [220] XRLJDW3W casting about for more helpers to extract..
  • [221] 3OKKTUT4 up and down arrow now moving by screen line where possible
  • [222] PX7DDEMO autosave slightly less aggressively
  • [223] XI5OALQX some redundant calls
  • [224] AYE2VEGJ extract a couple of methods
  • [225] 6VQIWTQU standardize on ordering of cases
  • [226] E6TMJY2T lighter color for in-progress strokes
  • [227] V5MJRFOZ bugfix: down arrow doesn't scroll up unnecessarily
  • [228] AVLAYODP much simpler
  • [229] 2ZRC7FUL .
  • [230] PVEZKGAC bugfix: recompute screen lines in backspace/delete
  • [231] JFFUF5AL override mouse state lookups in tests
  • [232] MP2TBKU6 bugfix: crash in Text.up() after return
  • [233] 2KRK3OBV don't rely on defaults
  • [234] OYXDYPGS get rid of debug variables
  • [235] MDXGMZU2 disable all debug prints
  • [236] P66MRF3U bugfix: don't append metadata when it already exists
  • [237] 4CXVIEBS add args to some functions
  • [238] VVAGDVCU experiment: line cursor
  • [239] 3TDOZESE extract scrolling logic out of insert_return
  • [240] 2L5MEZV3 experiment: new edit namespace
  • [241] YPHKZVWM extract a new variable
  • [242] BERHYBXM fix help for rectangles and squares
  • [243] 242L3OQX bugfix: ensure Cursor_line is always on a text line
  • [244] CRYGI3LR more drawing tests
  • [245] NUZFHX6I flesh out some tests for word movements
  • [246] ED2FYWDK turns out super- chords to get to textinput
  • [247] DGK5BPVI bugfix: UTF-8 in compute_fragments
  • [248] ZPUQSPQP extract a few methods
  • [249] KOTI3MFG bugfix in previous commit
  • [250] QVDQMJXV avoid scrolling down if possible
  • [251] JAXPXLEB set current_drawing_index with current_drawing
  • [252] 6LJZN727 handle chords
  • [253] NQH7DEEW bugfix: missed rename in one file
  • [254] G6OYAYHU paste in text with M-v
  • [255] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [256] 2L4DL7PG go through App in a couple more places
  • [257] Y4VYNEGF test: autosave after name/move/delete of point
  • [258] IRCKL6VN extract scrolling logic out of insert_at_cursor
  • [259] EGH7XDBK support non-text lines in Text.to2
  • [260] 4WAFGF4Z selection bugfix
  • [261] UH4YWHW5 button framework is at the app level
  • [262] EHX6Q4OJ make the cursor a little thicker
  • [263] DLQMM265 scroll past first page
  • [264] ZZ2B5RPQ extract variables for drawing padding
  • [265] R22PA3XR fix a second BSOD in #4 :/
  • [266] PIEDOKYQ bugfix
  • [267] J2SVGR2E experiment: blinking cursor
  • [268] F63Q4OV7 several bugfixes
  • [269] OP643FFG move
  • [270] OTIBCAUJ love2d scaffold
  • [271] XNFTJHC4 split keyboard handling between Text and Drawing
  • [272] YW5324Q3 bugfix: cut (C-x) without first selecting anything
  • [273] CIQN2MDE bugfix: typing a capital letter deletes selection

Change contents

  • replacement in undo.lua at line 10
    [20.460][20.460:577]()
    History[Next_history] = data
    Next_history = Next_history+1
    for i=Next_history,#History do
    History[i] = nil
    [20.460]
    [20.577]
    Editor_state.history[Editor_state.next_history] = data
    Editor_state.next_history = Editor_state.next_history+1
    for i=Editor_state.next_history,#Editor_state.history do
    Editor_state.history[i] = nil
  • replacement in undo.lua at line 18
    [20.610][20.610:763]()
    if Next_history > 1 then
    --? print('moving to history', Next_history-1)
    Next_history = Next_history-1
    local result = History[Next_history]
    [20.610]
    [20.763]
    if Editor_state.next_history > 1 then
    --? print('moving to history', Editor_state.next_history-1)
    Editor_state.next_history = Editor_state.next_history-1
    local result = Editor_state.history[Editor_state.next_history]
  • replacement in undo.lua at line 27
    [20.814][20.814:975]()
    if Next_history <= #History then
    --? print('restoring history', Next_history+1)
    local result = History[Next_history]
    Next_history = Next_history+1
    [20.814]
    [20.975]
    if 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
    [20.218][20.1:22]()
    assert(#Lines > 0)
    [20.218]
    [20.22]
    assert(#Editor_state.lines > 0)
  • replacement in undo.lua at line 45
    [20.48][20.48:84]()
    if s > #Lines then s = #Lines end
    [20.48]
    [20.84]
    if s > #Editor_state.lines then s = #Editor_state.lines end
  • replacement in undo.lua at line 47
    [20.110][20.110:146]()
    if e > #Lines then e = #Lines end
    [20.110]
    [20.1147]
    if e > #Editor_state.lines then e = #Editor_state.lines end
  • replacement in undo.lua at line 50
    [20.1206][20.1206:1310]()
    screen_top=deepcopy(Screen_top1),
    selection=deepcopy(Selection1),
    cursor=deepcopy(Cursor1),
    [20.1206]
    [20.1310]
    screen_top=deepcopy(Editor_state.screen_top1),
    selection=deepcopy(Editor_state.selection1),
    cursor=deepcopy(Editor_state.cursor1),
  • replacement in undo.lua at line 54
    [20.1349][20.1349:1398]()
    previous_drawing_mode=Previous_drawing_mode,
    [20.1349]
    [20.1413]
    previous_drawing_mode=Editor_state.previous_drawing_mode,
  • replacement in undo.lua at line 62
    [20.269][20.269:295]()
    local line = Lines[i]
    [20.269]
    [20.1592]
    local line = Editor_state.lines[i]
  • replacement in text_tests.lua at line 6
    [20.107][20.107:130](),[20.130][20.2:49]()
    Lines = load_array{}
    Margin_right = 0; Margin_width = Margin_left
    [20.107]
    [18.2]
    Editor_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
    [18.16][20.143:474](),[20.143][20.143:474]()
    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')
    [18.16]
    [20.474]
    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
    [20.604][20.604:627](),[20.627][20.50:97]()
    Lines = load_array{}
    Margin_right = 0; Margin_width = Margin_left
    [20.604]
    [18.17]
    Editor_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
    [18.31][20.640:687](),[20.640][20.640:687]()
    App.run_after_mouse_click(8,Margin_top+8, 1)
    [18.31]
    [20.687]
    App.run_after_mouse_click(8,Editor_state.margin_top+8, 1)
  • replacement in text_tests.lua at line 24
    [20.738][20.738:874]()
    check_eq(#Lines, 2, 'F - test_click_to_create_drawing/#lines')
    check_eq(Cursor1.line, 2, 'F - test_click_to_create_drawing/cursor')
    [20.738]
    [20.874]
    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
    [20.1115][20.1115:1159](),[20.1159][20.98:145]()
    Lines = load_array{'```lines', '```', ''}
    Margin_right = 0; Margin_width = Margin_left
    [20.1115]
    [20.1159]
    Editor_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
    [20.1244][20.1244:1263]()
    Cursor1.line = 2
    [20.1244]
    [20.1263]
    Editor_state.cursor1.line = 2
  • replacement in text_tests.lua at line 38
    [20.1338][20.1338:1482]()
    check_eq(#Lines, 1, 'F - test_backspace_to_delete_drawing/#lines')
    check_eq(Cursor1.line, 1, 'F - test_backspace_to_delete_drawing/cursor')
    [20.1338]
    [20.1482]
    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
    [20.126][20.126:149](),[20.149][20.146:193]()
    Lines = load_array{}
    Margin_right = 0; Margin_width = Margin_left
    [20.126]
    [18.32]
    Editor_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
    [20.193][20.193:216]()
    local y = Margin_top
    [20.193]
    [20.216]
    local 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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.149]
    [20.288]
    Editor_state.lines = load_array{''}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.104][20.104:205]()
    Lines = load_array{'a'}
    Cursor1 = {line=1, pos=2}
    Margin_right = 0; Margin_width = Margin_left
    [20.104]
    [18.47]
    Editor_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
    [20.251][20.251:300]()
    check_eq(Cursor1.pos, 1, 'F - test_move_left')
    [20.251]
    [20.300]
    check_eq(Editor_state.cursor1.pos, 1, 'F - test_move_left')
  • replacement in text_tests.lua at line 79
    [20.404][20.404:505]()
    Lines = load_array{'a'}
    Cursor1 = {line=1, pos=1}
    Margin_right = 0; Margin_width = Margin_left
    [20.404]
    [18.62]
    Editor_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
    [20.552][20.552:602]()
    check_eq(Cursor1.pos, 2, 'F - test_move_right')
    [20.552]
    [20.287]
    check_eq(Editor_state.cursor1.pos, 2, 'F - test_move_right')
  • replacement in text_tests.lua at line 90
    [20.734][20.734:844]()
    Lines = load_array{'abc', 'def'}
    Cursor1 = {line=2, pos=1}
    Margin_right = 0; Margin_width = Margin_left
    [20.734]
    [18.77]
    Editor_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
    [20.890][20.890:1053]()
    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 line
    [20.890]
    [20.1053]
    check_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
    [20.1183][20.1183:1314]()
    Lines = load_array{'abc', 'def'}
    Cursor1 = {line=1, pos=4} -- past end of line
    Margin_right = 0; Margin_width = Margin_left
    [20.1183]
    [18.92]
    Editor_state.lines = load_array{'abc', 'def'}
    Editor_state.cursor1 = {line=1, pos=4} -- past end of line
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
  • replacement in text_tests.lua at line 107
    [20.1361][20.1361:1497]()
    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')
    [20.1361]
    [20.1497]
    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
    [20.1623][20.1623:1726]()
    Lines = load_array{'abc'}
    Cursor1 = {line=1, pos=3}
    Margin_right = 0; Margin_width = Margin_left
    [20.1623]
    [18.107]
    Editor_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
    [20.1774][20.1774:1835]()
    check_eq(Cursor1.pos, 1, 'F - test_move_to_start_of_word')
    [20.1774]
    [20.1835]
    check_eq(Editor_state.cursor1.pos, 1, 'F - test_move_to_start_of_word')
  • replacement in text_tests.lua at line 125
    [20.1979][20.1979:2117]()
    Lines = load_array{'abc def'}
    Cursor1 = {line=1, pos=4} -- at the space between words
    Margin_right = 0; Margin_width = Margin_left
    [20.1979]
    [18.122]
    Editor_state.lines = load_array{'abc def'}
    Editor_state.cursor1 = {line=1, pos=4} -- at the space between words
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
  • replacement in text_tests.lua at line 130
    [20.2165][20.2165:2235]()
    check_eq(Cursor1.pos, 1, 'F - test_move_to_start_of_previous_word')
    [20.2165]
    [20.2235]
    check_eq(Editor_state.cursor1.pos, 1, 'F - test_move_to_start_of_previous_word')
  • replacement in text_tests.lua at line 136
    [20.2361][20.2361:2500]()
    Lines = load_array{'abc def'}
    Cursor1 = {line=1, pos=5} -- at the start of second word
    Margin_right = 0; Margin_width = Margin_left
    [20.2361]
    [18.137]
    Editor_state.lines = load_array{'abc def'}
    Editor_state.cursor1 = {line=1, pos=5} -- at the start of second word
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
  • replacement in text_tests.lua at line 141
    [20.2548][20.2548:2609]()
    check_eq(Cursor1.pos, 1, 'F - test_skip_to_previous_word')
    [20.2548]
    [20.2]
    check_eq(Editor_state.cursor1.pos, 1, 'F - test_skip_to_previous_word')
  • replacement in text_tests.lua at line 147
    [20.146][20.146:281]()
    Lines = load_array{'abc def\tghi'}
    Cursor1 = {line=1, pos=10} -- within third word
    Margin_right = 0; Margin_width = Margin_left
    [20.146]
    [18.152]
    Editor_state.lines = load_array{'abc def\tghi'}
    Editor_state.cursor1 = {line=1, pos=10} -- within third word
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
  • replacement in text_tests.lua at line 152
    [20.329][20.329:399]()
    check_eq(Cursor1.pos, 9, 'F - test_skip_past_tab_to_previous_word')
    [20.329]
    [20.2]
    check_eq(Editor_state.cursor1.pos, 9, 'F - test_skip_past_tab_to_previous_word')
  • replacement in text_tests.lua at line 158
    [20.160][20.160:300]()
    Lines = load_array{'abc def'}
    Cursor1 = {line=1, pos=6} -- at the start of second word
    Margin_right = 0; Margin_width = Margin_left
    [20.160]
    [18.167]
    Editor_state.lines = load_array{'abc def'}
    Editor_state.cursor1 = {line=1, pos=6} -- at the start of second word
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
  • replacement in text_tests.lua at line 163
    [20.348][20.348:425]()
    check_eq(Cursor1.pos, 1, 'F - test_skip_multiple_spaces_to_previous_word')
    [20.348]
    [20.2609]
    check_eq(Editor_state.cursor1.pos, 1, 'F - test_skip_multiple_spaces_to_previous_word')
  • replacement in text_tests.lua at line 169
    [20.2769][20.2769:2883]()
    Lines = load_array{'abc def', 'ghi'}
    Cursor1 = {line=2, pos=1}
    Margin_right = 0; Margin_width = Margin_left
    [20.2769]
    [18.182]
    Editor_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
    [20.2931][20.2931:3097]()
    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')
    [20.2931]
    [20.3097]
    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
    [20.3223][20.3223:3330]()
    Lines = load_array{'abc def'}
    Cursor1 = {line=1, pos=1}
    Margin_right = 0; Margin_width = Margin_left
    [20.3223]
    [18.197]
    Editor_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
    [20.3379][20.3379:3440]()
    check_eq(Cursor1.pos, 4, 'F - test_move_past_end_of_word')
    [20.3379]
    [20.3440]
    check_eq(Editor_state.cursor1.pos, 4, 'F - test_move_past_end_of_word')
  • replacement in text_tests.lua at line 192
    [20.3558][20.3558:3696]()
    Lines = load_array{'abc def'}
    Cursor1 = {line=1, pos=4} -- at the space between words
    Margin_right = 0; Margin_width = Margin_left
    [20.3558]
    [18.212]
    Editor_state.lines = load_array{'abc def'}
    Editor_state.cursor1 = {line=1, pos=4} -- at the space between words
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
  • replacement in text_tests.lua at line 197
    [20.3745][20.3745:3802]()
    check_eq(Cursor1.pos, 8, 'F - test_skip_to_next_word')
    [20.3745]
    [20.3802]
    check_eq(Editor_state.cursor1.pos, 8, 'F - test_skip_to_next_word')
  • replacement in text_tests.lua at line 203
    [20.531][20.531:670]()
    Lines = load_array{'abc\tdef'}
    Cursor1 = {line=1, pos=1} -- at the space between words
    Margin_right = 0; Margin_width = Margin_left
    [20.531]
    [18.227]
    Editor_state.lines = load_array{'abc\tdef'}
    Editor_state.cursor1 = {line=1, pos=1} -- at the space between words
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
  • replacement in text_tests.lua at line 208
    [20.719][20.719:785]()
    check_eq(Cursor1.pos, 4, 'F - test_skip_past_tab_to_next_word')
    [20.719]
    [20.785]
    check_eq(Editor_state.cursor1.pos, 4, 'F - test_skip_past_tab_to_next_word')
  • replacement in text_tests.lua at line 214
    [20.571][20.571:711]()
    Lines = load_array{'abc def'}
    Cursor1 = {line=1, pos=4} -- at the start of second word
    Margin_right = 0; Margin_width = Margin_left
    [20.571]
    [18.242]
    Editor_state.lines = load_array{'abc def'}
    Editor_state.cursor1 = {line=1, pos=4} -- at the start of second word
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
  • replacement in text_tests.lua at line 219
    [20.760][20.760:833]()
    check_eq(Cursor1.pos, 9, 'F - test_skip_multiple_spaces_to_next_word')
    [20.760]
    [20.833]
    check_eq(Editor_state.cursor1.pos, 9, 'F - test_skip_multiple_spaces_to_next_word')
  • replacement in text_tests.lua at line 225
    [20.3954][20.3954:4068]()
    Lines = load_array{'abc def', 'ghi'}
    Cursor1 = {line=1, pos=8}
    Margin_right = 0; Margin_width = Margin_left
    [20.3954]
    [18.257]
    Editor_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
    [20.4117][20.4117:4275]()
    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')
    [20.4117]
    [20.4275]
    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_left
    Cursor1 = {line=2, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.151]
    [20.300]
    Editor_state.lines = load_array{'abc', 'def'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.286][20.2:61](),[20.385][20.2:61]()
    App.run_after_mouse_click(Margin_left+8,Margin_top+5, 1)
    [18.286]
    [20.453]
    App.run_after_mouse_click(Editor_state.margin_left+8,Editor_state.margin_top+5, 1)
  • replacement in text_tests.lua at line 247
    [20.471][20.41:105](),[20.105][20.2:112]()
    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')
    [20.471]
    [20.2]
    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
    [20.193][20.193:354]()
    Lines = load_array{'', 'def'}
    Margin_right = 0; Margin_width = Margin_left
    Cursor1 = {line=2, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.193]
    [20.354]
    Editor_state.lines = load_array{'', 'def'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.301][20.396:455](),[20.396][20.396:455]()
    App.run_after_mouse_click(Margin_left+8,Margin_top+5, 1)
    [18.301]
    [20.455]
    App.run_after_mouse_click(Editor_state.margin_left+8,Editor_state.margin_top+5, 1)
  • replacement in text_tests.lua at line 264
    [20.473][20.473:551]()
    check_eq(Cursor1.line, 1, 'F - test_click_with_mouse_on_empty_line/cursor')
    [20.473]
    [20.524]
    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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.190]
    [18.302]
    Editor_state.lines = load_array{'abc', 'def', 'ghi'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.316][20.359:382](),[20.359][20.359:382]()
    local y = Margin_top
    [18.316]
    [20.382]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 278
    [20.442][20.442:464]()
    y = y + Line_height
    [20.442]
    [20.464]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 280
    [20.524][20.524:546]()
    y = y + Line_height
    [20.524]
    [20.546]
    y = 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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.725]
    [18.317]
    Editor_state.lines = load_array{'abc', 'defgh', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.331][20.896:919](),[20.896][20.896:919]()
    local y = Margin_top
    [18.331]
    [20.919]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 295
    [20.988][20.988:1010]()
    y = y + Line_height
    [20.988]
    [20.1010]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 297
    [20.1079][20.1079:1101]()
    y = y + Line_height
    [20.1079]
    [20.1101]
    y = 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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.1298]
    [18.332]
    Editor_state.lines = load_array{'abc def ghi', 'jkl'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.346][20.1468:1491](),[20.1468][20.1468:1491]()
    local y = Margin_top
    [18.346]
    [20.1491]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 312
    [20.1566][20.1566:1588]()
    y = y + Line_height
    [20.1566]
    [20.1588]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 314
    [20.1663][20.1663:1685]()
    y = y + Line_height
    [20.1663]
    [20.1685]
    y = 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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.1966]
    [18.347]
    Editor_state.lines = load_array{'abcd e fghijk', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.361][20.2138:2161](),[20.2138][20.2138:2161]()
    local y = Margin_top
    [18.361]
    [20.2161]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 330
    [20.2244][20.2244:2266]()
    y = y + Line_height
    [20.2244]
    [20.2266]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 332
    [20.2350][20.2350:2372]()
    y = y + Line_height
    [20.2350]
    [20.2372]
    y = 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 apostrophe
    Margin_right = 0; Margin_width = Margin_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.206]
    [18.362]
    Editor_state.lines = load_array{'madam I’m adam', 'xyz'} -- notice the non-ASCII apostrophe
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.376][20.417:440](),[20.417][20.417:440]()
    local y = Margin_top
    [18.376]
    [20.440]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 348
    [20.531][20.531:553]()
    y = y + Line_height
    [20.531]
    [20.553]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 350
    [20.646][20.646:668]()
    y = y + Line_height
    [20.646]
    [20.668]
    y = 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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.190]
    [18.377]
    Editor_state.lines = load_array{"madam I'm adam"}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.391][20.342:365](),[20.342][20.342:365]()
    local y = Margin_top
    [18.391]
    [20.365]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 367
    [20.450][20.450:472]()
    y = y + Line_height
    [20.450]
    [20.472]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 369
    [20.558][20.558:580]()
    y = y + Line_height
    [20.558]
    [20.580]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 373
    [20.730][20.730:879]()
    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')
    [20.730]
    [20.879]
    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_left
    Cursor1 = {line=1, pos=8}
    Screen_top1 = {line=1, pos=7}
    Screen_bottom1 = {}
    [20.296]
    [18.392]
    Editor_state.lines = load_array{"madam I'm adam"}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.406][20.448:471](),[20.448][20.448:471]()
    local y = Margin_top
    [18.406]
    [20.471]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 390
    [20.596][20.596:618]()
    y = y + Line_height
    [20.596]
    [20.618]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 394
    [20.755][20.755:982]()
    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')
    [20.755]
    [20.982]
    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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.1090]
    [18.407]
    Editor_state.lines = load_array{"madam I'm adam"}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.421][20.1242:1265](),[20.1242][20.1242:1265]()
    local y = Margin_top
    [18.421]
    [20.1265]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 411
    [20.1359][20.1359:1381]()
    y = y + Line_height
    [20.1359]
    [20.1381]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 413
    [20.1476][20.1476:1498]()
    y = y + Line_height
    [20.1476]
    [20.1498]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 415
    [20.1587][20.1587:1609]()
    y = y + Line_height
    [20.1587]
    [20.1609]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 419
    [20.1740][20.1740:1869]()
    check_eq(Cursor1.pos, 15, 'F - test_click_past_end_of_wrapping_line/cursor') -- one more than the number of UTF-8 code-points
    [20.1740]
    [20.1869]
    check_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 apostrophe
    Margin_right = 0; Margin_width = Margin_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.253]
    [18.422]
    Editor_state.lines = load_array{'madam I’m adam'} -- notice the non-ASCII apostrophe
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.436][20.443:466](),[20.443][20.443:466]()
    local y = Margin_top
    [18.436]
    [20.466]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 435
    [20.572][20.572:594]()
    y = y + Line_height
    [20.572]
    [20.594]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 437
    [20.703][20.703:725]()
    y = y + Line_height
    [20.703]
    [20.725]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 439
    [20.826][20.826:848]()
    y = y + Line_height
    [20.826]
    [20.848]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 443
    [20.981][20.981:1122]()
    check_eq(Cursor1.pos, 15, 'F - test_click_on_wrapping_line_containing_non_ascii/cursor') -- one more than the number of UTF-8 code-points
    [20.981]
    [20.2]
    check_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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.335]
    [18.437]
    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_left
    Editor_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
    [18.451][20.518:541](),[20.518][20.518:541]()
    local y = Margin_top
    [18.451]
    [20.541]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 460
    [20.654][20.654:676]()
    y = y + Line_height
    [20.654]
    [20.203]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 464
    [20.843][20.843:927]()
    check_eq(Cursor1.pos, 20, 'F - test_click_past_end_of_word_wrapping_line/cursor')
    [20.843]
    [20.2]
    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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.341]
    [18.452]
    Editor_state.lines = load_array{'abc def'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.482][20.482:746]()
    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')
    [20.482]
    [20.2]
    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_left
    Cursor1 = {line=1, pos=1}
    Selection1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.381]
    [18.467]
    Editor_state.lines = load_array{'abc'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.516][20.516:701]()
    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')
    [20.516]
    [20.2]
    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_left
    Cursor1 = {line=1, pos=1}
    Selection1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.461]
    [18.482]
    Editor_state.lines = load_array{'abc'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.452][20.452:520]()
    check_eq(Lines[1].data, 'xbc', 'F - test_edit_deletes_selection')
    [20.452]
    [20.2]
    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_left
    Cursor1 = {line=1, pos=1}
    Selection1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.501]
    [18.497]
    Editor_state.lines = load_array{'abc'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.620][20.620:787]()
    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')
    [20.620]
    [20.2]
    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_left
    Cursor1 = {line=1, pos=1}
    Selection1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.541]
    [18.512]
    Editor_state.lines = load_array{'abc'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.550][20.550:617]()
    check(Selection1.line, 'F - test_copy_does_not_reset_selection')
    [20.550]
    [20.2]
    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_left
    Cursor1 = {line=1, pos=1}
    Selection1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.581]
    [18.527]
    Editor_state.lines = load_array{'abc'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.451][20.451:504]()
    check_eq(Lines[1].data, 'bc', 'F - test_cut/data')
    [20.451]
    [20.504]
    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_left
    Cursor1 = {line=2, pos=1}
    Selection1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.621]
    [18.542]
    Editor_state.lines = load_array{'abc', 'def'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.1068][20.1068:1141]()
    check_eq(Lines[1].data, 'xyzdef', 'F - test_paste_replaces_selection')
    [20.1068]
    [20.520]
    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_left
    Cursor1 = {line=3, pos=2}
    Screen_top1 = {line=2, pos=1}
    Screen_bottom1 = {}
    [20.164]
    [18.557]
    Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.571][20.340:363](),[20.340][20.340:363]()
    local y = Margin_top
    [18.571]
    [20.363]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 614
    [20.452][20.452:474]()
    y = y + Line_height
    [20.452]
    [20.474]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 616
    [20.563][20.563:585]()
    y = y + Line_height
    [20.563]
    [20.585]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 619
    [20.742][20.742:773]()
    Selection1 = {line=1, pos=2}
    [20.742]
    [20.773]
    Editor_state.selection1 = {line=1, pos=2}
  • replacement in text_tests.lua at line 623
    [20.854][20.854:1008]()
    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')
    [20.854]
    [20.1008]
    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_left
    Cursor1 = {line=2, pos=4}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.2571]
    [18.572]
    Editor_state.lines = load_array{'abc', 'def', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.2913][20.2913:2936]()
    local y = Margin_top
    [20.2851]
    [20.2936]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 642
    [20.3005][20.3005:3027]()
    y = y + Line_height
    [20.3005]
    [20.3027]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 644
    [20.3096][20.3096:3118]()
    y = y + Line_height
    [20.3096]
    [20.3118]
    y = 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_left
    Cursor1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.27]
    [18.587]
    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_left
    Editor_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
    [18.601][20.3530:3553](),[20.3530][20.3530:3553]()
    local y = Margin_top
    [18.601]
    [20.3553]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 660
    [20.3627][20.3627:3649]()
    y = y + Line_height
    [20.3627]
    [20.3649]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 662
    [20.3723][20.3723:3745]()
    y = y + Line_height
    [20.3723]
    [20.3745]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 666
    [20.3911][20.3911:4130]()
    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_top
    [20.3911]
    [20.4130]
    check_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
    [20.4193][20.4193:4215]()
    y = y + Line_height
    [20.4193]
    [20.4215]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 673
    [20.4279][20.4279:4301]()
    y = y + Line_height
    [20.4279]
    [20.4301]
    y = 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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.1614]
    [20.1798]
    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_left
    Editor_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
    [20.1876][20.1876:2207]()
    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')
    [20.1876]
    [20.4366]
    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_left
    Cursor1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.27]
    [18.602]
    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_left
    Editor_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
    [18.616][20.4722:4745](),[20.4722][20.4722:4745]()
    local y = Margin_top
    [18.616]
    [20.4745]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 706
    [20.4826][20.4826:4848]()
    y = y + Line_height
    [20.4826]
    [20.4848]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 708
    [20.4929][20.4929:4951]()
    y = y + Line_height
    [20.4929]
    [20.4951]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 713
    [20.5147][20.5147:5387]()
    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_top
    [20.5147]
    [20.5387]
    check_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
    [20.5459][20.5459:5481]()
    y = y + Line_height
    [20.5459]
    [20.5481]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 720
    [20.5553][20.5553:5575]()
    y = y + Line_height
    [20.5553]
    [20.5575]
    y = 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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    Selection1 = {}
    edit.draw() -- populate line.y for each line in Lines
    App.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')
    [20.5776]
    [20.179]
    Editor_state.lines = load_array{'abc', 'def', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    App.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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    Selection1 = {}
    edit.draw() -- populate line.y for each line in Lines
    [20.308]
    [20.2]
    Editor_state.lines = load_array{'abc', 'def', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.40][20.280:339]()
    App.run_after_mouse_press(Margin_left+8,Margin_top+5, 1)
    [20.40]
    [20.107]
    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')
    [20.144]
    [20.538]
    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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    Selection1 = {}
    edit.draw() -- populate line.y for each line in Lines
    [20.687]
    [20.581]
    Editor_state.lines = load_array{'abc', 'def', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.610][20.415:535]()
    App.run_after_mouse_press(Margin_left+8,Margin_top+5, 1)
    App.run_after_mouse_release(Margin_left+8,Margin_top+5, 1)
    [20.610]
    [20.746]
    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
    [20.396][20.536:670]()
    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)
    [20.396]
    [20.548]
    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
    [20.581][20.1131:1313](),[20.1131][20.1131:1313](),[20.1313][20.153:323]()
    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')
    [20.581]
    [20.2]
    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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    Selection1 = {}
    edit.draw() -- populate line.y for each line in Lines
    [20.173]
    [20.446]
    Editor_state.lines = load_array{'abc', 'def', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.475][20.671:791]()
    App.run_after_mouse_press(Margin_left+8,Margin_top+5, 1)
    App.run_after_mouse_release(Margin_left+8,Margin_top+5, 1)
    [20.475]
    [20.611]
    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
    [20.752][20.792:926]()
    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)
    [20.752]
    [20.838]
    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
    [20.936][20.927:1060]()
    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)
    [20.936]
    [20.1087]
    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
    [20.1185][20.1185:1581]()
    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')
    [20.1185]
    [20.6250]
    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_left
    Cursor1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    Selection1 = {}
    [20.108]
    [18.849]
    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_left
    Editor_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
    [20.429][20.429:492]()
    check_nil(Selection1.line, 'F - test_cut_without_selection')
    [20.429]
    [20.492]
    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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.6350]
    [20.6506]
    Editor_state.lines = load_array{'abc', 'def', 'ghi'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.878][20.6568:6591](),[20.6568][20.6568:6591]()
    local y = Margin_top
    [18.878]
    [20.6591]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 843
    [20.6659][20.6659:6681]()
    y = y + Line_height
    [20.6659]
    [20.6681]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 847
    [20.6838][20.6838:6975]()
    check_eq(Screen_top1.line, 2, 'F - test_pagedown/screen_top')
    check_eq(Cursor1.line, 2, 'F - test_pagedown/cursor')
    y = Margin_top
    [20.6838]
    [20.6975]
    check_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
    [20.7034][20.7034:7056]()
    y = y + Line_height
    [20.7034]
    [20.7056]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 859
    [20.29][20.29:91](),[20.91][20.7294:7349](),[20.7294][20.7294:7349]()
    App.screen.init{width=Margin_left+drawing_width, height=80}
    Lines = load_array{'abc', -- height 15
    [20.29]
    [20.7349]
    App.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_left
    check_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 -- default
    [20.7514]
    [20.7779]
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    check_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
    [18.893][20.7959:7982](),[20.7959][20.7959:7982]()
    local y = Margin_top
    [18.893]
    [20.7982]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 878
    [20.8259][20.8259:8443]()
    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_height
    [20.8259]
    [20.8443]
    check_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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.8730]
    [18.894]
    Editor_state.lines = load_array{'abc', 'def ghi jkl', 'mno'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.908][20.8907:8930](),[20.8907][20.8907:8930]()
    local y = Margin_top
    [18.908]
    [20.184]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 896
    [20.287][20.9030:9052](),[20.9030][20.9030:9052]()
    y = y + Line_height
    [20.287]
    [20.288]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 898
    [20.392][20.9153:9175](),[20.9153][20.9153:9175]()
    y = y + Line_height
    [20.392]
    [20.393]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 902
    [20.9372][20.582:978](),[20.978][20.9756:9773](),[20.9756][20.9756:9773]()
    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_top
    [20.9372]
    [20.979]
    check_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
    [20.1074][20.9865:9887](),[20.9865][20.9865:9887]()
    y = y + Line_height
    [20.1074]
    [20.1075]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 910
    [20.1170][20.9978:10000](),[20.9978][20.9978:10000]()
    y = y + Line_height
    [20.1170]
    [20.1171]
    y = 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_left
    Cursor1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.1475]
    [18.909]
    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_left
    Editor_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
    [18.923][20.1723:1746](),[20.1723][20.1723:1746]()
    local y = Margin_top
    [18.923]
    [20.1746]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 926
    [20.1859][20.1859:1881]()
    y = y + Line_height
    [20.1859]
    [20.1881]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 928
    [20.1994][20.1994:2016]()
    y = y + Line_height
    [20.1994]
    [20.2016]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 932
    [20.2229][20.2229:2470]()
    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_top
    [20.2229]
    [20.2470]
    check_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
    [20.2574][20.2574:2596]()
    y = y + Line_height
    [20.2574]
    [20.2596]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 938
    [20.2701][20.2701:2723]()
    y = y + Line_height
    [20.2701]
    [20.2723]
    y = 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_left
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.10220]
    [20.10383]
    Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.938][20.10447:10470](),[20.10447][20.10447:10470]()
    local y = Margin_top
    [18.938]
    [20.10470]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 954
    [20.10553][20.10553:10575]()
    y = y + Line_height
    [20.10553]
    [20.10575]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 956
    [20.10658][20.10658:10680]()
    y = y + Line_height
    [20.10658]
    [20.10680]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 960
    [20.10863][20.10863:11013]()
    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')
    [20.10863]
    [20.11013]
    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
    [20.11042][20.11042:11059]()
    y = Margin_top
    [20.11042]
    [20.11059]
    y = Editor_state.margin_top
  • replacement in text_tests.lua at line 965
    [20.11133][20.11133:11155]()
    y = y + Line_height
    [20.11133]
    [20.11155]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 967
    [20.11229][20.11229:11251]()
    y = y + Line_height
    [20.11229]
    [20.11251]
    y = 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_left
    Cursor1 = {line=3, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.11549]
    [18.939]
    Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.953][20.11725:11748](),[20.11725][20.11725:11748]()
    local y = Margin_top
    [18.953]
    [20.11748]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 983
    [20.11843][20.11843:11865]()
    y = y + Line_height
    [20.11843]
    [20.11865]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 985
    [20.11960][20.11960:11982]()
    y = y + Line_height
    [20.11960]
    [20.11982]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 989
    [20.12180][20.12180:12371]()
    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_top
    [20.12180]
    [20.12371]
    check_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
    [20.12457][20.12457:12479]()
    y = y + Line_height
    [20.12457]
    [20.12479]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 995
    [20.12565][20.12565:12587]()
    y = y + Line_height
    [20.12565]
    [20.12587]
    y = 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_left
    Cursor1 = {line=3, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.12871]
    [18.954]
    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_left
    Editor_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
    [18.968][20.13093:13116](),[20.13093][20.13093:13116]()
    local y = Margin_top
    [18.968]
    [20.13116]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1011
    [20.13218][20.13218:13240]()
    y = y + Line_height
    [20.13218]
    [20.13240]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1013
    [20.13342][20.13342:13364]()
    y = y + Line_height
    [20.13342]
    [20.13364]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1017
    [20.13617][20.13617:13920]()
    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_top
    [20.13617]
    [20.13920]
    check_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
    [20.14013][20.14013:14035]()
    y = y + Line_height
    [20.14013]
    [20.14035]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1024
    [20.14129][20.14129:14151]()
    y = y + Line_height
    [20.14129]
    [20.14151]
    y = 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_left
    Cursor1 = {line=3, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.14498]
    [18.969]
    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_left
    Editor_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
    [18.983][20.14719:14742](),[20.14719][20.14719:14742]()
    local y = Margin_top
    [18.983]
    [20.14742]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1040
    [20.14872][20.14872:14894]()
    y = y + Line_height
    [20.14872]
    [20.14894]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1042
    [20.15024][20.15024:15046]()
    y = y + Line_height
    [20.15024]
    [20.15046]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1046
    [20.15281][20.15281:15668]()
    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_top
    [20.15281]
    [20.15668]
    check_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
    [20.15789][20.15789:15811]()
    y = y + Line_height
    [20.15789]
    [20.15811]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1053
    [20.15934][20.15934:15956]()
    y = y + Line_height
    [20.15934]
    [20.15956]
    y = 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_left
    Cursor1 = {line=3, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.16235]
    [18.984]
    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_left
    Editor_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
    [18.998][20.16456:16479](),[20.16456][20.16456:16479]()
    local y = Margin_top
    [18.998]
    [20.16479]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1068
    [20.16597][20.16597:16619]()
    y = y + Line_height
    [20.16597]
    [20.16619]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1070
    [20.16737][20.16737:16759]()
    y = y + Line_height
    [20.16737]
    [20.16759]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1074
    [20.16992][20.16992:17356]()
    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')
    [20.16992]
    [20.17356]
    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
    [20.17491][20.17491:17842]()
    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_top
    [20.17491]
    [20.17842]
    check_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
    [20.17953][20.17953:17975]()
    y = y + Line_height
    [20.17953]
    [20.17975]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1086
    [20.18082][20.18082:18104]()
    y = y + Line_height
    [20.18082]
    [20.18104]
    y = 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_left
    Cursor1 = {line=3, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.18405]
    [18.999]
    Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.1013][20.18568:18591](),[20.18568][20.18568:18591]()
    local y = Margin_top
    [18.1013]
    [20.18591]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1102
    [20.18672][20.18672:18694]()
    y = y + Line_height
    [20.18672]
    [20.18694]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1104
    [20.18775][20.18775:18797]()
    y = y + Line_height
    [20.18775]
    [20.18797]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1108
    [20.18971][20.18971:19117]()
    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')
    [20.18971]
    [20.19117]
    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
    [20.19146][20.19146:19163]()
    y = Margin_top
    [20.19146]
    [20.19163]
    y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1113
    [20.19235][20.19235:19257]()
    y = y + Line_height
    [20.19235]
    [20.19257]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1115
    [20.19329][20.19329:19351]()
    y = y + Line_height
    [20.19329]
    [20.19351]
    y = 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_left
    Cursor1 = {line=2, pos=1}
    Screen_top1 = {line=2, pos=1}
    Screen_bottom1 = {}
    [20.19624]
    [18.1014]
    Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.1028][20.19787:19810](),[20.19787][20.19787:19810]()
    local y = Margin_top
    [18.1028]
    [20.19810]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1131
    [20.19901][20.19901:19923]()
    y = y + Line_height
    [20.19901]
    [20.19923]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1133
    [20.20014][20.20014:20036]()
    y = y + Line_height
    [20.20014]
    [20.20036]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1137
    [20.20224][20.20224:20407]()
    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_top
    [20.20224]
    [20.20407]
    check_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
    [20.20489][20.20489:20511]()
    y = y + Line_height
    [20.20489]
    [20.20511]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1143
    [20.20593][20.20593:20615]()
    y = y + Line_height
    [20.20593]
    [20.20615]
    y = 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_left
    Cursor1 = {line=3, pos=6}
    Screen_top1 = {line=3, pos=5}
    Screen_bottom1 = {}
    [20.20879]
    [18.1029]
    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_left
    Editor_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
    [18.1043][20.21101:21124](),[20.21101][20.21101:21124]()
    local y = Margin_top
    [18.1043]
    [20.21124]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1159
    [20.21222][20.21222:21244]()
    y = y + Line_height
    [20.21222]
    [20.21244]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1163
    [20.21448][20.21448:21465]()
    y = Margin_top
    [20.21448]
    [20.21465]
    y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1165
    [20.21555][20.21555:21577]()
    y = y + Line_height
    [20.21555]
    [20.21577]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1167
    [20.21666][20.21666:21688]()
    y = y + Line_height
    [20.21666]
    [20.21688]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1169
    [20.21777][20.21777:22144]()
    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')
    [20.21777]
    [20.22144]
    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_left
    Cursor1 = {line=2, pos=1}
    Screen_top1 = {line=2, pos=1}
    Screen_bottom1 = {}
    [20.22319]
    [18.1044]
    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_left
    Editor_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
    [18.1058][20.22541:22564](),[20.22541][20.22541:22564]()
    local y = Margin_top
    [18.1058]
    [20.22564]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1187
    [20.22664][20.22664:22686]()
    y = y + Line_height
    [20.22664]
    [20.22686]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1189
    [20.22786][20.22786:22808]()
    y = y + Line_height
    [20.22786]
    [20.22808]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1193
    [20.23031][20.23031:23048]()
    y = Margin_top
    [20.23031]
    [20.23048]
    y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1195
    [20.23139][20.23139:23161]()
    y = y + Line_height
    [20.23139]
    [20.23161]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1197
    [20.23252][20.23252:23274]()
    y = y + Line_height
    [20.23252]
    [20.23274]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1199
    [20.23365][20.23365:23740]()
    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')
    [20.23365]
    [20.23740]
    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_left
    Cursor1 = {line=2, pos=1}
    Screen_top1 = {line=2, pos=1}
    Screen_bottom1 = {}
    [20.23975]
    [18.1059]
    Editor_state.lines = load_array{'', 'abc', 'def', 'ghi', 'jkl'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.1073][20.24142:24165](),[20.24142][20.24142:24165]()
    local y = Margin_top
    [18.1073]
    [20.24165]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1217
    [20.24258][20.24258:24280]()
    y = y + Line_height
    [20.24258]
    [20.24280]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1219
    [20.24373][20.24373:24395]()
    y = y + Line_height
    [20.24373]
    [20.24395]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1223
    [20.24585][20.24585:24772]()
    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_top
    [20.24585]
    [20.24772]
    check_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
    [20.24794][20.24794:24816]()
    y = y + Line_height
    [20.24794]
    [20.24816]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1229
    [20.24900][20.24900:24922]()
    y = y + Line_height
    [20.24900]
    [20.24922]
    y = 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_left
    Cursor1 = {line=2, pos=1}
    Screen_top1 = {line=2, pos=1}
    Screen_bottom1 = {}
    [20.25102]
    [20.25258]
    Editor_state.lines = load_array{'abc', 'def', 'ghi'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.1088][20.25319:25342](),[20.25319][20.25319:25342]()
    local y = Margin_top
    [18.1088]
    [20.25342]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1245
    [20.25408][20.25408:25430]()
    y = y + Line_height
    [20.25408]
    [20.25430]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1249
    [20.25579][20.25579:25712]()
    check_eq(Screen_top1.line, 1, 'F - test_pageup/screen_top')
    check_eq(Cursor1.line, 1, 'F - test_pageup/cursor')
    y = Margin_top
    [20.25579]
    [20.25712]
    check_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
    [20.25769][20.25769:25791]()
    y = y + Line_height
    [20.25769]
    [20.25791]
    y = 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_left
    Cursor1 = {line=2, pos=1}
    Screen_top1 = {line=2, pos=1}
    Screen_bottom1 = {}
    [20.26026]
    [18.1089]
    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_left
    Editor_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
    [18.1103][20.26248:26271](),[20.26248][20.26248:26271]()
    local y = Margin_top
    [18.1103]
    [20.26271]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1269
    [20.26363][20.26363:26385]()
    y = y + Line_height
    [20.26363]
    [20.26385]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1271
    [20.26477][20.26477:26499]()
    y = y + Line_height
    [20.26477]
    [20.26499]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1275
    [20.26737][20.26737:27010]()
    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_top
    [20.26737]
    [20.27010]
    check_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
    [20.27094][20.27094:27116]()
    y = y + Line_height
    [20.27094]
    [20.27116]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1282
    [20.27199][20.27199:27221]()
    y = y + Line_height
    [20.27199]
    [20.27221]
    y = 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_left
    Cursor1 = {line=2, pos=5}
    Screen_top1 = {line=2, pos=5}
    Screen_bottom1 = {}
    [20.27430]
    [18.1104]
    -- 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_left
    Editor_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
    [18.1118][20.27727:27750](),[20.27727][20.27727:27750]()
    local y = Margin_top
    [18.1118]
    [20.27750]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1298
    [20.27851][20.27851:27873]()
    y = y + Line_height
    [20.27851]
    [20.27873]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1302
    [20.28120][20.28120:28420]()
    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_top
    [20.28120]
    [20.28420]
    check_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
    [20.28513][20.28513:28535]()
    y = y + Line_height
    [20.28513]
    [20.28535]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1309
    [20.28627][20.28627:28649]()
    y = y + Line_height
    [20.28627]
    [20.28649]
    y = 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_left
    Cursor1 = {line=3, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.28904]
    [18.1119]
    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_left
    Editor_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
    [18.1133][20.29122:29145](),[20.29122][20.29122:29145]()
    local y = Margin_top
    [18.1133]
    [20.29145]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1325
    [20.29238][20.29238:29260]()
    y = y + Line_height
    [20.29238]
    [20.29260]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1327
    [20.29353][20.29353:29375]()
    y = y + Line_height
    [20.29353]
    [20.29375]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1331
    [20.29560][20.29560:29836]()
    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_top
    [20.29560]
    [20.29836]
    check_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
    [20.29920][20.29920:29942]()
    y = y + Line_height
    [20.29920]
    [20.29942]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1338
    [20.30024][20.30024:30046]()
    y = y + Line_height
    [20.30024]
    [20.30046]
    y = 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_left
    Cursor1 = {line=4, pos=2}
    Screen_top1 = {line=4, pos=1}
    Screen_bottom1 = {}
    [20.30337]
    [18.1134]
    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_left
    Editor_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
    [18.1148][20.30555:30578](),[20.30555][20.30555:30578]()
    local y = Margin_top
    [18.1148]
    [20.30578]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1356
    [20.30798][20.30798:31155]()
    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_top
    [20.30798]
    [20.31155]
    check_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
    [20.31264][20.31264:31286]()
    y = y + Line_height
    [20.31264]
    [20.31286]
    y = 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_left
    Cursor1 = {line=2, pos=1}
    Screen_top1 = {line=2, pos=1}
    Screen_bottom1 = {}
    [20.328]
    [18.1149]
    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_left
    Editor_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
    [20.634][20.634:1024]()
    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_top
    [20.634]
    [20.1024]
    check_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_left
    Cursor1 = {line=3, pos=4}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.175]
    [18.1164]
    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_left
    Editor_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
    [18.1178][20.393:416](),[20.393][20.393:416]()
    local y = Margin_top
    [18.1178]
    [20.416]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1396
    [20.510][20.510:532]()
    y = y + Line_height
    [20.510]
    [20.532]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1398
    [20.626][20.626:648]()
    y = y + Line_height
    [20.626]
    [20.648]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1404
    [20.906][20.906:1185]()
    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_top
    [20.906]
    [20.1185]
    check_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
    [20.1270][20.1270:1292]()
    y = y + Line_height
    [20.1270]
    [20.1292]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1411
    [20.1379][20.1379:1401]()
    y = y + Line_height
    [20.1379]
    [20.1401]
    y = 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_left
    Screen_top1 = {line=3, pos=5}
    Screen_bottom1 = {}
    [20.182]
    [20.372]
    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_left
    Editor_state.screen_top1 = {line=3, pos=5}
    Editor_state.screen_bottom1 = {}
  • replacement in text_tests.lua at line 1424
    [20.404][20.404:432]()
    Cursor1 = {line=3, pos=5}
    [20.404]
    [18.1179]
    Editor_state.cursor1 = {line=3, pos=5}
  • replacement in text_tests.lua at line 1426
    [18.1193][20.445:468](),[20.445][20.445:468]()
    local y = Margin_top
    [18.1193]
    [20.468]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1428
    [20.565][20.565:587]()
    y = y + Line_height
    [20.565]
    [20.587]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1432
    [20.794][20.794:811]()
    y = Margin_top
    [20.794]
    [20.811]
    y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1434
    [20.900][20.900:922]()
    y = y + Line_height
    [20.900]
    [20.922]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1436
    [20.1010][20.1010:1032]()
    y = y + Line_height
    [20.1010]
    [20.1032]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1438
    [20.1120][20.1120:1483]()
    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')
    [20.1120]
    [20.1483]
    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_left
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.1677]
    [20.1867]
    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_left
    Editor_state.screen_top1 = {line=1, pos=1}
    Editor_state.screen_bottom1 = {}
  • replacement in text_tests.lua at line 1453
    [20.1908][20.1908:1936]()
    Cursor1 = {line=3, pos=5}
    [20.1908]
    [18.1194]
    Editor_state.cursor1 = {line=3, pos=5}
  • replacement in text_tests.lua at line 1455
    [18.1208][20.1949:1972](),[20.1949][20.1949:1972]()
    local y = Margin_top
    [18.1208]
    [20.1972]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1457
    [20.2072][20.2072:2094]()
    y = y + Line_height
    [20.2072]
    [20.2094]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1459
    [20.2194][20.2194:2216]()
    y = y + Line_height
    [20.2194]
    [20.2216]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1463
    [20.2469][20.2469:2766]()
    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_top
    [20.2469]
    [20.2766]
    check_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
    [20.2857][20.2857:2879]()
    y = y + Line_height
    [20.2857]
    [20.2879]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1470
    [20.2971][20.2971:2993]()
    y = y + Line_height
    [20.2971]
    [20.2993]
    y = 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_left
    Screen_top1 = {line=3, pos=5}
    Screen_bottom1 = {}
    [20.3252]
    [20.3442]
    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_left
    Editor_state.screen_top1 = {line=3, pos=5}
    Editor_state.screen_bottom1 = {}
  • replacement in text_tests.lua at line 1483
    [20.3474][20.3474:3502]()
    Cursor1 = {line=3, pos=5}
    [20.3474]
    [18.1209]
    Editor_state.cursor1 = {line=3, pos=5}
  • replacement in text_tests.lua at line 1485
    [18.1223][20.3515:3538](),[20.3515][20.3515:3538]()
    local y = Margin_top
    [18.1223]
    [20.3538]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1487
    [20.3629][20.3629:3651]()
    y = y + Line_height
    [20.3629]
    [20.3651]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1491
    [20.3842][20.3842:3859]()
    y = Margin_top
    [20.3842]
    [20.3859]
    y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1493
    [20.3942][20.3942:3964]()
    y = y + Line_height
    [20.3942]
    [20.3964]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1495
    [20.4046][20.4046:4068]()
    y = y + Line_height
    [20.4046]
    [20.4068]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1497
    [20.4150][20.4150:4489]()
    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')
    [20.4150]
    [20.1484]
    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_left
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.4663]
    [20.4853]
    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_left
    Editor_state.screen_top1 = {line=1, pos=1}
    Editor_state.screen_bottom1 = {}
  • replacement in text_tests.lua at line 1512
    [20.4894][20.4894:4922]()
    Cursor1 = {line=3, pos=5}
    [20.4894]
    [18.1224]
    Editor_state.cursor1 = {line=3, pos=5}
  • replacement in text_tests.lua at line 1514
    [18.1238][20.4935:4958](),[20.4935][20.4935:4958]()
    local y = Margin_top
    [18.1238]
    [20.4958]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1516
    [20.5050][20.5050:5072]()
    y = y + Line_height
    [20.5050]
    [20.5072]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1518
    [20.5164][20.5164:5186]()
    y = y + Line_height
    [20.5164]
    [20.5186]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1522
    [20.5417][20.5417:5690]()
    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_top
    [20.5417]
    [20.5690]
    check_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
    [20.5773][20.5773:5795]()
    y = y + Line_height
    [20.5773]
    [20.5795]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1529
    [20.5879][20.5879:5901]()
    y = y + Line_height
    [20.5879]
    [20.5901]
    y = 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_left
    Cursor1 = {line=1, pos=25}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.663]
    [18.1239]
    Editor_state.lines = load_array{'abc def ghi jkl mno pqr ', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.1253][20.31794:31817](),[20.31794][20.31794:31817]()
    local y = Margin_top
    [18.1253]
    [20.31897]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1545
    [20.32015][20.32015:32037]()
    y = y + Line_height
    [20.32015]
    [20.32037]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1547
    [20.32155][20.32155:32177]()
    y = y + Line_height
    [20.32155]
    [20.32177]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1553
    [20.32440][20.32440:32532]()
    check_eq(Cursor1.pos, 28, 'F - test_move_cursor_using_mouse/cursor:pos')
    y = Margin_top
    [20.32440]
    [20.32532]
    check_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
    [20.32650][20.32650:32672]()
    y = y + Line_height
    [20.32650]
    [20.32672]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1558
    [20.32790][20.32790:32812]()
    y = y + Line_height
    [20.32790]
    [20.32812]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1561
    [20.33004][20.1737:1812]()
    App.run_after_mouse_release(Margin_left+8,Margin_top+Line_height*2+5, 1)
    [20.33004]
    [20.33130]
    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
    [20.33154][20.33154:33305]()
    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')
    [20.33154]
    [20.33305]
    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_left
    Cursor1 = {line=2, pos=1}
    Screen_top1 = {line=2, pos=1}
    Screen_bottom1 = {}
    [20.33490]
    [18.1254]
    Editor_state.lines = load_array{'abc', 'def', 'ghi', 'jkl'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [18.1268][20.33653:33676](),[20.33653][20.33653:33676]()
    local y = Margin_top
    [18.1268]
    [20.33676]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1579
    [20.33759][20.33759:33781]()
    y = y + Line_height
    [20.33759]
    [20.33781]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1581
    [20.33864][20.33864:33886]()
    y = y + Line_height
    [20.33864]
    [20.33886]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1585
    [20.34070][20.34070:34237]()
    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_top
    [20.34070]
    [20.34237]
    check_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
    [20.34314][20.34314:34336]()
    y = y + Line_height
    [20.34314]
    [20.34336]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1591
    [20.34410][20.34410:34432]()
    y = y + Line_height
    [20.34410]
    [20.34432]
    y = 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_left
    Cursor1 = {line=3, pos=5}
    Screen_top1 = {line=3, pos=5}
    Screen_bottom1 = {}
    [20.34682]
    [18.1269]
    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_left
    Editor_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
    [18.1283][20.34904:34927](),[20.34904][20.34904:34927]()
    local y = Margin_top
    [18.1283]
    [20.34927]
    local y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1607
    [20.35022][20.35022:35044]()
    y = y + Line_height
    [20.35022]
    [20.35044]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1611
    [20.35247][20.35247:35264]()
    y = Margin_top
    [20.35247]
    [20.35264]
    y = Editor_state.margin_top
  • replacement in text_tests.lua at line 1613
    [20.35352][20.35352:35374]()
    y = y + Line_height
    [20.35352]
    [20.35374]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1615
    [20.35458][20.35458:35480]()
    y = y + Line_height
    [20.35458]
    [20.35480]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1617
    [20.35566][20.35566:35921]()
    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')
    [20.35566]
    [20.2208]
    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_left
    Cursor1 = {line=2, pos=1}
    [20.2360]
    [20.2497]
    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_left
    Editor_state.cursor1 = {line=2, pos=1}
  • replacement in text_tests.lua at line 1632
    [20.2575][20.2575:2652]()
    check_eq(Lines[1].data, 'abcdef', "F - test_backspace_past_line_boundary")
    [20.2575]
    [20.35921]
    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_left
    Cursor1 = {line=1, pos=1}
    Selection1 = {line=1, pos=2}
    [20.36235]
    [20.36424]
    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_left
    Editor_state.cursor1 = {line=1, pos=1}
    Editor_state.selection1 = {line=1, pos=2}
  • replacement in text_tests.lua at line 1648
    [20.36543][20.36543:36617]()
    check_eq(Lines[1].data, 'bc', "F - test_backspace_over_selection/data")
    [20.36543]
    [20.36617]
    check_eq(Editor_state.lines[1].data, 'bc', "F - test_backspace_over_selection/data")
  • replacement in text_tests.lua at line 1650
    [20.36661][20.36661:36813]()
    check_eq(Cursor1.line, 1, "F - test_backspace_over_selection/cursor:line")
    check_eq(Cursor1.pos, 1, "F - test_backspace_over_selection/cursor:pos")
    [20.36661]
    [20.36813]
    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
    [20.36839][20.36839:36915]()
    check_nil(Selection1.line, "F - test_backspace_over_selection/selection")
    [20.36839]
    [20.36915]
    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_left
    Cursor1 = {line=1, pos=2}
    Selection1 = {line=1, pos=1}
    [20.37096]
    [20.37285]
    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_left
    Editor_state.cursor1 = {line=1, pos=2}
    Editor_state.selection1 = {line=1, pos=1}
  • replacement in text_tests.lua at line 1666
    [20.37369][20.37369:37451]()
    check_eq(Lines[1].data, 'bc', "F - test_backspace_over_selection_reverse/data")
    [20.37369]
    [20.37451]
    check_eq(Editor_state.lines[1].data, 'bc', "F - test_backspace_over_selection_reverse/data")
  • replacement in text_tests.lua at line 1668
    [20.37491][20.37491:37659]()
    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")
    [20.37491]
    [20.37659]
    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
    [20.37685][20.37685:37769]()
    check_nil(Selection1.line, "F - test_backspace_over_selection_reverse/selection")
    [20.37685]
    [20.37769]
    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_left
    Cursor1 = {line=1, pos=2}
    Selection1 = {line=4, pos=2}
    [20.37944]
    [20.38133]
    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_left
    Editor_state.cursor1 = {line=1, pos=2}
    Editor_state.selection1 = {line=4, pos=2}
  • replacement in text_tests.lua at line 1684
    [20.38262][20.38262:38426]()
    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")
    [20.38262]
    [20.38426]
    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
    [20.38468][20.38468:38630]()
    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")
    [20.38468]
    [20.38630]
    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
    [20.38656][20.38656:38737]()
    check_nil(Selection1.line, "F - test_backspace_over_multiple_lines/selection")
    [20.38656]
    [20.38737]
    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_left
    Cursor1 = {line=1, pos=2}
    Selection1 = {line=1, pos=4}
    [20.38875]
    [20.39064]
    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_left
    Editor_state.cursor1 = {line=1, pos=2}
    Editor_state.selection1 = {line=1, pos=4}
  • replacement in text_tests.lua at line 1703
    [20.39172][20.39172:39328]()
    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")
    [20.39172]
    [20.39328]
    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
    [20.39370][20.39370:39526]()
    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")
    [20.39370]
    [20.39526]
    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
    [20.39552][20.39552:39630]()
    check_nil(Selection1.line, "F - test_backspace_to_start_of_line/selection")
    [20.39552]
    [20.39630]
    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_left
    Cursor1 = {line=2, pos=1}
    Selection1 = {line=2, pos=3}
    [20.39774]
    [20.39963]
    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_left
    Editor_state.cursor1 = {line=2, pos=1}
    Editor_state.selection1 = {line=2, pos=3}
  • replacement in text_tests.lua at line 1722
    [20.40076][20.40076:40232]()
    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")
    [20.40076]
    [20.40232]
    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
    [20.40274][20.40274:40430]()
    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")
    [20.40274]
    [20.40430]
    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
    [20.40456][20.40456:40534]()
    check_nil(Selection1.line, "F - test_backspace_to_start_of_line/selection")
    [20.40456]
    [20.40534]
    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_left
    Cursor1 = {line=2, pos=4}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.40650]
    [20.40806]
    Editor_state.lines = load_array{'abc', 'def', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.40861][20.40861:41200]()
    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_top
    [20.40861]
    [20.41200]
    check_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
    [20.41276][20.41276:41298]()
    y = y + Line_height
    [20.41276]
    [20.41298]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1750
    [20.41375][20.41375:41397]()
    y = y + Line_height
    [20.41375]
    [20.41397]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1754
    [20.41515][20.41515:41812]()
    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_top
    [20.41515]
    [20.41812]
    check_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
    [20.41879][20.41879:41901]()
    y = y + Line_height
    [20.41879]
    [20.41901]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1762
    [20.41968][20.41968:41990]()
    y = y + Line_height
    [20.41968]
    [20.41990]
    y = 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_left
    Cursor1 = {line=2, pos=5}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.42173]
    [20.42330]
    Editor_state.lines = load_array{'abc', 'defg', 'xyz'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.42392][20.42392:42731]()
    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_top
    [20.42392]
    [20.42731]
    check_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
    [20.42807][20.42807:42829]()
    y = y + Line_height
    [20.42807]
    [20.42829]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1784
    [20.42905][20.42905:42927]()
    y = y + Line_height
    [20.42905]
    [20.42927]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1789
    [20.43097][20.43097:43550]()
    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_top
    [20.43097]
    [20.43550]
    check_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
    [20.43617][20.43617:43639]()
    y = y + Line_height
    [20.43617]
    [20.43639]
    y = y + Editor_state.line_height
  • replacement in text_tests.lua at line 1799
    [20.43707][20.43707:43729]()
    y = y + Line_height
    [20.43707]
    [20.43729]
    y = 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_left
    Cursor1 = {line=1, pos=1}
    Selection1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    [20.703]
    [18.1299]
    Editor_state.lines = load_array{'abc'}
    Editor_state.margin_right = 0; Editor_state.margin_width = Editor_state.margin_left
    Editor_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
    [20.412][20.412:574]()
    check_eq(Lines[1].data, 'xbc', 'F - test_undo_restores_selection/baseline')
    check_nil(Selection1.line, 'F - test_undo_restores_selection/baseline:selection')
    [20.412]
    [20.574]
    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
    [20.643][20.643:785]()
    check_eq(Selection1.line, 1, 'F - test_undo_restores_selection/line')
    check_eq(Selection1.pos, 2, 'F - test_undo_restores_selection/pos')
    [20.643]
    [20.43796]
    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
    [20.26][20.93:337]()
    --? 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))
    [20.26]
    [20.337]
    --? 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
    [20.74][20.1:65](),[20.65][20.47:127]()
    if Text.lt1(Screen_top1, {line=line_index, pos=pos}) then
    y = y + Line_height
    if y + Line_height > App.screen.height then
    [20.74]
    [20.420]
    if Text.lt1(Editor_state.screen_top1, {line=line_index, pos=pos}) then
    y = y + Editor_state.line_height
    if y + Editor_state.line_height > App.screen.height then
  • replacement in text.lua at line 46
    [20.2206][20.649:705]()
    --? print('checking to draw', pos, Screen_top1.pos)
    [20.2206]
    [20.387]
    --? print('checking to draw', pos, Editor_state.screen_top1.pos)
  • replacement in text.lua at line 48
    [20.427][20.66:128](),[20.128][20.38:68]()
    if Text.le1(Screen_top1, {line=line_index, pos=pos}) then
    if Selection1.line then
    [20.427]
    [20.3]
    if Text.le1(Editor_state.screen_top1, {line=line_index, pos=pos}) then
    if Editor_state.selection1.line then
  • replacement in text.lua at line 57
    [20.2324][20.221:326](),[20.326][20.2:142](),[20.142][20.3:113]()
    if line_index == Cursor1.line then
    if pos <= Cursor1.pos and pos + frag_len > Cursor1.pos then
    if Search_term then
    if Lines[Cursor1.line].data:sub(Cursor1.pos, Cursor1.pos+utf8.len(Search_term)-1) == Search_term then
    local lo_px = Text.draw_highlight(line, x,y, pos, Cursor1.pos, Cursor1.pos+utf8.len(Search_term))
    [20.2288]
    [17.28]
    if line_index == Editor_state.cursor1.line then
    if pos <= Editor_state.cursor1.pos and pos + frag_len > Editor_state.cursor1.pos then
    if Editor_state.search_term then
    if 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 then
    local 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
    [17.62][20.114:170](),[20.471][20.114:170]()
    love.graphics.print(Search_term, x+lo_px,y)
    [17.62]
    [20.530]
    love.graphics.print(Editor_state.search_term, x+lo_px,y)
  • replacement in text.lua at line 66
    [20.557][20.557:622]()
    Text.draw_cursor(x+Text.x(frag, Cursor1.pos-pos+1), y)
    [20.557]
    [20.622]
    Text.draw_cursor(x+Text.x(frag, Editor_state.cursor1.pos-pos+1), y)
  • replacement in text.lua at line 73
    [20.37][20.635:726]()
    if Search_term == nil then
    if line_index == Cursor1.line and Cursor1.pos == pos then
    [20.37]
    [20.726]
    if Editor_state.search_term == nil then
    if line_index == Editor_state.cursor1.line and Editor_state.cursor1.pos == pos then
  • replacement in text.lua at line 87
    [17.91][20.102:158](),[20.102][20.102:158]()
    love.graphics.rectangle('fill', x,y, 3,Line_height)
    [17.91]
    [17.92]
    love.graphics.rectangle('fill', x,y, 3,Editor_state.line_height)
  • replacement in text.lua at line 90
    [20.198][20.1:16](),[20.256][20.1:16](),[20.16][20.660:687]()
    Cursor_x = x
    Cursor_y = y+Line_height
    [20.198]
    [20.256]
    Editor_state.cursor_x = x
    Editor_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)
    [9.76]
    [20.1]
    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 then
    Text.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)
    [20.28]
    [20.396]
    if Editor_state.cursor_y >= App.screen.height - Editor_state.line_height then
    Text.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
    [20.402][20.1275:1342](),[20.28][20.1275:1342]()
    record_undo_event({before=before, after=snapshot(Cursor1.line)})
    [20.402]
    [20.60]
    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+1
    [20.99]
    [20.513]
    local 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
    [20.627][20.671:732]()
    --? print('chord', chord, Selection1.line, Selection1.pos)
    [20.627]
    [20.1]
    --? print('chord', chord, Editor_state.selection1.line, Editor_state.selection1.pos)
  • replacement in text.lua at line 163
    [20.655][20.1343:1380]()
    local before_line = Cursor1.line
    [20.655]
    [20.1380]
    local before_line = Editor_state.cursor1.line
  • replacement in text.lua at line 166
    [20.27][7.3:23](),[7.23][20.3:60](),[20.27][20.3:60](),[20.60][20.89:176]()
    Selection1 = {}
    if (Cursor_y + Line_height) > App.screen.height then
    Text.snap_cursor_to_bottom_of_screen(Margin_left, App.screen.width-Margin_right)
    [20.27]
    [20.105]
    Editor_state.selection1 = {}
    if (Editor_state.cursor_y + Editor_state.line_height) > App.screen.height then
    Text.snap_cursor_to_bottom_of_screen(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 171
    [20.23][20.1422:1504](),[20.1648][20.1422:1504]()
    record_undo_event({before=before, after=snapshot(before_line, Cursor1.line)})
    [20.23]
    [20.134]
    record_undo_event({before=before, after=snapshot(before_line, Editor_state.cursor1.line)})
  • replacement in text.lua at line 173
    [20.163][20.1505:1547](),[20.1547][20.403:520]()
    local before = snapshot(Cursor1.line)
    --? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)
    [20.163]
    [20.163]
    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 then
    Text.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)
    [20.195]
    [20.806]
    if Editor_state.cursor_y >= App.screen.height - Editor_state.line_height then
    Text.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
    [20.44][20.1548:1617](),[20.1006][20.1548:1617]()
    record_undo_event({before=before, after=snapshot(Cursor1.line)})
    [20.44]
    [20.2046]
    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 then
    Text.delete_selection(Margin_left, App.screen.width-Margin_right)
    [20.2081]
    [20.45]
    if Editor_state.selection1.line then
    Text.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 then
    before = 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)
    [20.1635]
    [20.2256]
    if Editor_state.cursor1.pos > 1 then
    before = 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
    [20.2306][20.2083:2222]()
    Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_start-1)..string.sub(Lines[Cursor1.line].data, byte_end)
    [20.2306]
    [20.2442]
    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
    [20.2455][20.2223:2314]()
    Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_start-1)
    [20.2455]
    [20.2544]
    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
    [20.62][20.2359:2395](),[20.90][20.2359:2395](),[20.2359][20.2359:2395]()
    Cursor1.pos = Cursor1.pos-1
    [20.2556]
    [20.2590]
    Editor_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 then
    before = snapshot(Cursor1.line-1, Cursor1.line)
    if Lines[Cursor1.line-1].mode == 'drawing' then
    table.remove(Lines, Cursor1.line-1)
    [20.2600]
    [20.2728]
    elseif Editor_state.cursor1.line > 1 then
    before = snapshot(Editor_state.cursor1.line-1, Editor_state.cursor1.line)
    if Editor_state.lines[Editor_state.cursor1.line-1].mode == 'drawing' then
    table.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)+1
    Lines[Cursor1.line-1].data = Lines[Cursor1.line-1].data..Lines[Cursor1.line].data
    table.remove(Lines, Cursor1.line)
    [20.2761]
    [20.2948]
    Editor_state.cursor1.pos = utf8.len(Editor_state.lines[Editor_state.cursor1.line-1].data)+1
    Editor_state.lines[Editor_state.cursor1.line-1].data = Editor_state.lines[Editor_state.cursor1.line-1].data..Editor_state.lines[Editor_state.cursor1.line].data
    table.remove(Editor_state.lines, Editor_state.cursor1.line)
  • replacement in text.lua at line 212
    [20.2958][20.2768:2804]()
    Cursor1.line = Cursor1.line-1
    [20.2958]
    [20.2858]
    Editor_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) then
    local 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)
    [20.2866]
    [20.3]
    if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) then
    local 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
    [20.3000][8.3:45](),[8.45][20.173:216](),[20.3000][20.173:216]()
    Text.clear_cache(Lines[Cursor1.line])
    assert(Text.le1(Screen_top1, Cursor1))
    [20.3000]
    [20.68]
    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
    [20.88][20.1774:1843](),[20.3034][20.1774:1843]()
    record_undo_event({before=before, after=snapshot(Cursor1.line)})
    [20.88]
    [20.3034]
    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 then
    Text.delete_selection(Margin_left, App.screen.width-Margin_right)
    [20.3066]
    [20.89]
    if Editor_state.selection1.line then
    Text.delete_selection(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 231
    [20.1869][20.1869:1969]()
    if Cursor1.pos <= utf8.len(Lines[Cursor1.line].data) then
    before = snapshot(Cursor1.line)
    [20.1869]
    [20.1969]
    if Editor_state.cursor1.pos <= utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) then
    before = snapshot(Editor_state.cursor1.line)
  • replacement in text.lua at line 234
    [20.1978][20.1978:2032]()
    before = snapshot(Cursor1.line, Cursor1.line+1)
    [20.1978]
    [20.8546]
    before = snapshot(Editor_state.cursor1.line, Editor_state.cursor1.line+1)
  • replacement in text.lua at line 236
    [20.8554][20.2805:3019](),[20.3066][20.2805:3019]()
    if Cursor1.pos <= utf8.len(Lines[Cursor1.line].data) then
    local byte_start = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)
    local byte_end = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos+1)
    [20.8554]
    [20.3265]
    if Editor_state.cursor1.pos <= utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) then
    local 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
    [20.3315][20.3020:3159]()
    Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_start-1)..string.sub(Lines[Cursor1.line].data, byte_end)
    [20.3315]
    [20.3451]
    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
    [20.3464][20.3160:3251]()
    Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_start-1)
    [20.3464]
    [20.3553]
    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
    [20.184][20.3296:3332](),[20.186][20.3296:3332](),[20.3296][20.3296:3332]()
    -- no change to Cursor1.pos
    [20.3565]
    [20.3600]
    -- no change to Editor_state.cursor1.pos
  • replacement in text.lua at line 247
    [20.3610][20.3333:3469]()
    elseif Cursor1.line < #Lines then
    if Lines[Cursor1.line+1].mode == 'drawing' then
    table.remove(Lines, Cursor1.line+1)
    [20.3610]
    [20.3743]
    elseif Editor_state.cursor1.line < #Editor_state.lines then
    if Editor_state.lines[Editor_state.cursor1.line+1].mode == 'drawing' then
    table.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].data
    table.remove(Lines, Cursor1.line+1)
    [20.3776]
    [20.3904]
    Editor_state.lines[Editor_state.cursor1.line].data = Editor_state.lines[Editor_state.cursor1.line].data..Editor_state.lines[Editor_state.cursor1.line+1].data
    table.remove(Editor_state.lines, Editor_state.cursor1.line+1)
  • replacement in text.lua at line 256
    [20.3922][8.46:88]()
    Text.clear_cache(Lines[Cursor1.line])
    [20.3922]
    [20.112]
    Text.clear_cache(Editor_state.lines[Editor_state.cursor1.line])
  • replacement in text.lua at line 258
    [20.132][20.2033:2102](),[20.3956][20.2033:2102]()
    record_undo_event({before=before, after=snapshot(Cursor1.line)})
    [20.132]
    [20.209]
    record_undo_event({before=before, after=snapshot(Editor_state.cursor1.line)})
  • replacement in text.lua at line 261
    [20.277][20.3:61](),[20.61][20.97:117](),[20.293][20.97:117]()
    Text.left(Margin_left, App.screen.width-Margin_right)
    Selection1 = {}
    [20.277]
    [20.293]
    Text.left(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
    Editor_state.selection1 = {}
  • replacement in text.lua at line 264
    [20.324][20.62:121](),[20.121][20.118:138](),[20.41][20.118:138]()
    Text.right(Margin_left, App.screen.width-Margin_right)
    Selection1 = {}
    [20.324]
    [20.8673]
    Text.right(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
    Editor_state.selection1 = {}
  • replacement in text.lua at line 267
    [20.8705][20.8705:8796]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.8705]
    [20.8796]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 270
    [20.8804][20.122:180]()
    Text.left(Margin_left, App.screen.width-Margin_right)
    [20.8804]
    [20.8820]
    Text.left(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 272
    [20.8853][20.8853:8944]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.8853]
    [20.8944]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 275
    [20.8952][20.181:240]()
    Text.right(Margin_left, App.screen.width-Margin_right)
    [20.8952]
    [20.369]
    Text.right(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 278
    [20.456][20.241:304](),[20.304][20.139:159](),[20.22][20.139:159]()
    Text.word_left(Margin_left, App.screen.width-Margin_right)
    Selection1 = {}
    [20.456]
    [20.761]
    Text.word_left(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
    Editor_state.selection1 = {}
  • replacement in text.lua at line 281
    [20.794][20.305:369](),[20.369][20.160:180](),[20.85][20.160:180]()
    Text.word_right(Margin_left, App.screen.width-Margin_right)
    Selection1 = {}
    [20.794]
    [20.9088]
    Text.word_right(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
    Editor_state.selection1 = {}
  • replacement in text.lua at line 284
    [20.9122][20.9122:9213]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.9122]
    [20.9213]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 287
    [20.9221][20.370:433]()
    Text.word_left(Margin_left, App.screen.width-Margin_right)
    [20.9221]
    [20.9242]
    Text.word_left(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 289
    [20.9277][20.9277:9368]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.9277]
    [20.9368]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 292
    [20.9376][20.434:498]()
    Text.word_right(Margin_left, App.screen.width-Margin_right)
    [20.9376]
    [20.1073]
    Text.word_right(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 295
    [20.6016][20.3:23](),[20.1123][20.3:23]()
    Selection1 = {}
    [20.6016]
    [20.86]
    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 = {}
    [20.115]
    [20.9517]
    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
    [20.9549][20.9549:9640]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.9549]
    [20.9640]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 305
    [20.9699][20.9699:9790]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.9699]
    [20.9790]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 308
    [20.9798][20.565:630]()
    Text.end_of_line(Margin_left, App.screen.width-Margin_right)
    [20.9798]
    [20.3956]
    Text.end_of_line(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 310
    [20.3984][20.631:687](),[20.687][20.181:201](),[20.151][20.181:201]()
    Text.up(Margin_left, App.screen.width-Margin_right)
    Selection1 = {}
    [20.3984]
    [20.4433]
    Text.up(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
    Editor_state.selection1 = {}
  • replacement in text.lua at line 313
    [20.4463][20.688:746](),[20.746][20.202:222](),[20.9989][20.202:222]()
    Text.down(Margin_left, App.screen.width-Margin_right)
    Selection1 = {}
    [20.4463]
    [20.9989]
    Text.down(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
    Editor_state.selection1 = {}
  • replacement in text.lua at line 316
    [20.10019][20.10019:10110]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.10019]
    [20.10110]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 319
    [20.10118][20.747:803]()
    Text.up(Margin_left, App.screen.width-Margin_right)
    [20.10118]
    [20.10132]
    Text.up(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 321
    [20.10164][20.10164:10255]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.10164]
    [20.10255]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 324
    [20.10263][20.804:862]()
    Text.down(Margin_left, App.screen.width-Margin_right)
    [20.10263]
    [20.1]
    Text.down(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 326
    [20.33][20.863:923](),[20.923][20.223:243](),[20.191][20.223:243]()
    Text.pageup(Margin_left, App.screen.width-Margin_right)
    Selection1 = {}
    [20.33]
    [20.859]
    Text.pageup(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
    Editor_state.selection1 = {}
  • replacement in text.lua at line 329
    [20.893][20.924:986](),[20.986][20.244:264](),[20.10401][20.244:264]()
    Text.pagedown(Margin_left, App.screen.width-Margin_right)
    Selection1 = {}
    [20.893]
    [20.10401]
    Text.pagedown(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
    Editor_state.selection1 = {}
  • replacement in text.lua at line 332
    [20.10435][20.10435:10526]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.10435]
    [20.10526]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 335
    [20.10534][20.987:1047]()
    Text.pageup(Margin_left, App.screen.width-Margin_right)
    [20.10534]
    [20.10552]
    Text.pageup(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in text.lua at line 337
    [20.10588][20.10588:10679]()
    if Selection1.line == nil then
    Selection1 = {line=Cursor1.line, pos=Cursor1.pos}
    [20.10588]
    [20.10679]
    if Editor_state.selection1.line == nil then
    Editor_state.selection1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos}
  • replacement in text.lua at line 340
    [20.10687][20.1048:1110]()
    Text.pagedown(Margin_left, App.screen.width-Margin_right)
    [20.10687]
    [20.182]
    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+1
    Cursor1.pos = 1
    [20.223]
    [20.46]
    local 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+1
    Editor_state.cursor1.pos = 1
  • replacement in text.lua at line 357
    [20.115][15.89:139]()
    local top2 = Text.to2(Screen_top1, left, right)
    [20.115]
    [20.152]
    local top2 = Text.to2(Editor_state.screen_top1, left, right)
  • replacement in text.lua at line 359
    [20.183][20.3465:3509](),[20.3509][20.1339:1366]()
    local y = App.screen.height - Line_height
    while y >= Margin_top do
    [20.183]
    [20.26]
    local y = App.screen.height - Editor_state.line_height
    while 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 end
    if Lines[Screen_top1.line].mode == 'text' then
    y = y - Line_height
    elseif Lines[Screen_top1.line].mode == 'drawing' then
    y = y - Drawing_padding_height - Drawing.pixels(Lines[Screen_top1.line].h)
    [20.89]
    [20.555]
    if Editor_state.screen_top1.line == 1 and Editor_state.screen_top1.pos == 1 then break end
    if Editor_state.lines[Editor_state.screen_top1.line].mode == 'text' then
    y = y - Editor_state.line_height
    elseif Editor_state.lines[Editor_state.screen_top1.line].mode == 'drawing' then
    y = y - Editor_state.drawing_padding_height - Drawing.pixels(Editor_state.lines[Editor_state.screen_top1.line].h)
  • replacement in text.lua at line 370
    [20.83][20.607:704]()
    Screen_top1 = Text.to1(top2)
    Cursor1.line = Screen_top1.line
    Cursor1.pos = Screen_top1.pos
    [20.83]
    [13.3]
    Editor_state.screen_top1 = Text.to1(top2)
    Editor_state.cursor1.line = Editor_state.screen_top1.line
    Editor_state.cursor1.pos = Editor_state.screen_top1.pos
  • replacement in text.lua at line 374
    [13.93][20.783:857](),[20.783][20.783:857]()
    --? print(Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos)
    [13.93]
    [20.90]
    --? 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
    [20.2991][15.140:193]()
    local top2 = Text.to2(Screen_bottom1, left, right)
    [20.2991]
    [20.3031]
    local top2 = Text.to2(Editor_state.screen_bottom1, left, right)
  • replacement in text.lua at line 388
    [20.3158][20.3158:3227]()
    if Text.lt1(Screen_top1, new_top1) then
    Screen_top1 = new_top1
    [20.3158]
    [20.3227]
    if Text.lt1(Editor_state.screen_top1, new_top1) then
    Editor_state.screen_top1 = new_top1
  • replacement in text.lua at line 391
    [20.3234][20.3234:3318]()
    Screen_top1.line = Screen_bottom1.line
    Screen_top1.pos = Screen_bottom1.pos
    [20.3234]
    [20.3318]
    Editor_state.screen_top1.line = Editor_state.screen_bottom1.line
    Editor_state.screen_top1.pos = Editor_state.screen_bottom1.pos
  • replacement in text.lua at line 394
    [20.3324][20.963:1094](),[20.963][20.963:1094]()
    --? print('setting top to', Screen_top1.line, Screen_top1.pos)
    Cursor1.line = Screen_top1.line
    Cursor1.pos = Screen_top1.pos
    [20.3324]
    [13.94]
    --? print('setting top to', Editor_state.screen_top1.line, Editor_state.screen_top1.pos)
    Editor_state.cursor1.line = Editor_state.screen_top1.line
    Editor_state.cursor1.pos = Editor_state.screen_top1.pos
  • replacement in text.lua at line 398
    [13.184][20.1173:1214](),[20.1173][20.1173:1214]()
    --? print('top now', Screen_top1.line)
    [13.184]
    [20.96]
    --? print('top now', Editor_state.screen_top1.line)
  • replacement in text.lua at line 404
    [20.1213][20.107:152](),[20.107][20.107:152](),[20.152][20.152:232]()
    assert(Lines[Cursor1.line].mode == 'text')
    --? print('up', Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos)
    [20.1213]
    [20.3]
    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
    [20.443][20.443:484]()
    local new_cursor_line = Cursor1.line
    [20.443]
    [20.484]
    local new_cursor_line = Editor_state.cursor1.line
  • replacement in text.lua at line 413
    [20.559][20.559:611]()
    if Lines[new_cursor_line].mode == 'text' then
    [20.559]
    [20.611]
    if Editor_state.lines[new_cursor_line].mode == 'text' then
  • replacement in text.lua at line 415
    [20.657][20.657:696](),[20.696][16.284:365]()
    Cursor1.line = new_cursor_line
    Text.populate_screen_line_starting_pos(Lines[Cursor1.line], left, right)
    [20.657]
    [20.826]
    Editor_state.cursor1.line = new_cursor_line
    Text.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], left, right)
  • replacement in text.lua at line 419
    [20.937][20.937:1023]()
    local screen_line_starting_pos = Lines[Cursor1.line].screen_line_starting_pos
    [20.937]
    [20.1023]
    local screen_line_starting_pos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos
  • replacement in text.lua at line 423
    [20.1264][20.1264:1508]()
    if Screen_top1.line > Cursor1.line then
    Screen_top1.line = Cursor1.line
    Screen_top1.pos = screen_line_starting_pos
    --? print('pos of top of screen is also '..tostring(Screen_top1.pos)..' of the same line')
    [20.1264]
    [20.1508]
    if Editor_state.screen_top1.line > Editor_state.cursor1.line then
    Editor_state.screen_top1.line = Editor_state.cursor1.line
    Editor_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) - 1
    [20.1520]
    [20.1691]
    local 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
    [20.1714][20.1714:1796]()
    if Cursor1.line < Screen_top1.line then
    Screen_top1.line = Cursor1.line
    [20.1714]
    [20.1796]
    if Editor_state.cursor1.line < Editor_state.screen_top1.line then
    Editor_state.screen_top1.line = Editor_state.cursor1.line
  • replacement in text.lua at line 441
    [20.1956][20.1956:2057]()
    new_screen_line_starting_pos = Lines[Cursor1.line].screen_line_starting_pos[screen_line_index-1]
    [20.1956]
    [20.2057]
    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
    [20.2203][20.2203:2433]()
    if Screen_top1.line == Cursor1.line and Screen_top1.pos == screen_line_starting_pos then
    Screen_top1.pos = new_screen_line_starting_pos
    --? print('also setting pos of top of screen to '..tostring(Screen_top1.pos))
    [20.2203]
    [20.2433]
    if Editor_state.screen_top1.line == Editor_state.cursor1.line and Editor_state.screen_top1.pos == screen_line_starting_pos then
    Editor_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))
    [20.2441]
    [20.2671]
    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
    [20.1246][20.2703:2871](),[20.2703][20.2703:2871]()
    assert(Lines[Cursor1.line].mode == 'text')
    --? print('down', Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos, Screen_bottom1.line, Screen_bottom1.pos)
    [20.1246]
    [20.3]
    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
    [20.3017][20.3017:3096]()
    local new_cursor_line = Cursor1.line
    while new_cursor_line < #Lines do
    [20.3017]
    [20.3096]
    local new_cursor_line = Editor_state.cursor1.line
    while 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' then
    Cursor1.line = new_cursor_line
    Cursor1.pos = Text.nearest_cursor_pos(Lines[Cursor1.line].data, Cursor_x, left)
    --? print(Cursor1.pos)
    [20.3138]
    [20.3342]
    if Editor_state.lines[new_cursor_line].mode == 'text' then
    Editor_state.cursor1.line = new_cursor_line
    Editor_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
    [20.1321][20.3357:3477]()
    if Cursor1.line > Screen_bottom1.line then
    --? print('screen top before:', Screen_top1.line, Screen_top1.pos)
    [20.1321]
    [20.3515]
    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
    [20.92][20.3608:3680](),[20.321][20.3608:3680](),[20.3608][20.3608:3680]()
    --? print('screen top after:', Screen_top1.line, Screen_top1.pos)
    [20.321]
    [20.3680]
    --? print('screen top after:', Editor_state.screen_top1.line, Editor_state.screen_top1.pos)
  • replacement in text.lua at line 479
    [20.103][20.217:263](),[20.3772][20.217:263]()
    if Text.le1(Screen_bottom1, Cursor1) then
    [20.103]
    [20.104]
    if Text.le1(Editor_state.screen_bottom1, Editor_state.cursor1) then
  • replacement in text.lua at line 484
    [20.219][20.4091:4192](),[20.4091][20.4091:4192]()
    new_screen_line_starting_pos = Lines[Cursor1.line].screen_line_starting_pos[screen_line_index+1]
    [20.219]
    [20.4192]
    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)
    [20.4338]
    [20.130]
    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
    [20.138][20.4724:4796](),[20.378][20.4724:4796](),[20.4724][20.4724:4796]()
    --? print('screen top after:', Screen_top1.line, Screen_top1.pos)
    [20.378]
    [20.4796]
    --? print('screen top after:', Editor_state.screen_top1.line, Editor_state.screen_top1.pos)
  • replacement in text.lua at line 496
    [20.4810][20.4810:4931]()
    --? print('=>', Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos, Screen_bottom1.line, Screen_bottom1.pos)
    [20.4810]
    [20.6091]
    --? 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
    [20.6126][20.6126:6249]()
    Cursor1.pos = 1
    if Text.lt1(Cursor1, Screen_top1) then
    Screen_top1 = {line=Cursor1.line, pos=Cursor1.pos} -- copy
    [20.6126]
    [20.6249]
    Editor_state.cursor1.pos = 1
    if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) then
    Editor_state.screen_top1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} -- copy
  • replacement in text.lua at line 507
    [20.1286][20.6288:6343](),[20.6288][20.6288:6343]()
    Cursor1.pos = utf8.len(Lines[Cursor1.line].data) + 1
    [20.1286]
    [20.220]
    Editor_state.cursor1.pos = utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) + 1
  • replacement in text.lua at line 509
    [20.292][20.6404:6455](),[20.6404][20.6404:6455]()
    local botline1 = {line=Cursor1.line, pos=botpos}
    [20.292]
    [20.3]
    local botline1 = {line=Editor_state.cursor1.line, pos=botpos}
  • replacement in text.lua at line 518
    [20.4978][20.867:896]()
    if Cursor1.pos == 1 then
    [20.4978]
    [20.896]
    if Editor_state.cursor1.pos == 1 then
  • replacement in text.lua at line 521
    [20.916][20.916:986]()
    if Text.match(Lines[Cursor1.line].data, Cursor1.pos-1, '%S') then
    [20.916]
    [20.986]
    if Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos-1, '%S') then
  • replacement in text.lua at line 529
    [20.1086][20.1086:1115]()
    if Cursor1.pos == 1 then
    [20.1086]
    [20.1115]
    if Editor_state.cursor1.pos == 1 then
  • replacement in text.lua at line 532
    [20.1135][20.5033:5061](),[20.5033][20.5033:5061](),[20.5061][20.792:862]()
    assert(Cursor1.pos > 1)
    if Text.match(Lines[Cursor1.line].data, Cursor1.pos-1, '%s') then
    [20.1135]
    [20.5221]
    assert(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
    [20.1178][20.1178:1239]()
    if Cursor1.pos > utf8.len(Lines[Cursor1.line].data) then
    [20.1178]
    [20.1239]
    if Editor_state.cursor1.pos > utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) then
  • replacement in text.lua at line 545
    [20.1259][20.1259:1327]()
    if Text.match(Lines[Cursor1.line].data, Cursor1.pos, '%S') then
    [20.1259]
    [20.1327]
    if Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos, '%S') then
  • replacement in text.lua at line 552
    [20.35][20.1386:1447]()
    if Cursor1.pos > utf8.len(Lines[Cursor1.line].data) then
    [20.35]
    [20.1447]
    if Editor_state.cursor1.pos > utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) then
  • replacement in text.lua at line 555
    [20.1467][20.863:931](),[20.5383][20.863:931]()
    if Text.match(Lines[Cursor1.line].data, Cursor1.pos, '%s') then
    [20.1467]
    [20.5516]
    if Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos, '%s') then
  • replacement in text.lua at line 574
    [20.1424][20.68:171](),[20.68][20.68:171]()
    assert(Lines[Cursor1.line].mode == 'text')
    if Cursor1.pos > 1 then
    Cursor1.pos = Cursor1.pos-1
    [20.1424]
    [20.171]
    assert(Editor_state.lines[Editor_state.cursor1.line].mode == 'text')
    if Editor_state.cursor1.pos > 1 then
    Editor_state.cursor1.pos = Editor_state.cursor1.pos-1
  • replacement in text.lua at line 578
    [20.178][20.178:219]()
    local new_cursor_line = Cursor1.line
    [20.178]
    [20.219]
    local new_cursor_line = Editor_state.cursor1.line
  • replacement in text.lua at line 581
    [20.294][20.294:446]()
    if Lines[new_cursor_line].mode == 'text' then
    Cursor1.line = new_cursor_line
    Cursor1.pos = utf8.len(Lines[Cursor1.line].data) + 1
    [20.294]
    [20.446]
    if Editor_state.lines[new_cursor_line].mode == 'text' then
    Editor_state.cursor1.line = new_cursor_line
    Editor_state.cursor1.pos = utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) + 1
  • replacement in text.lua at line 588
    [20.6556][20.6556:6597](),[20.6597][15.194:246]()
    if Text.lt1(Cursor1, Screen_top1) then
    local top2 = Text.to2(Screen_top1, left, right)
    [20.6556]
    [20.150]
    if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) then
    local top2 = Text.to2(Editor_state.screen_top1, left, right)
  • replacement in text.lua at line 591
    [20.206][20.6679:6712](),[20.6679][20.6679:6712]()
    Screen_top1 = Text.to1(top2)
    [20.206]
    [20.568]
    Editor_state.screen_top1 = Text.to1(top2)
  • replacement in text.lua at line 603
    [20.293][20.601:738](),[20.601][20.601:738]()
    assert(Lines[Cursor1.line].mode == 'text')
    if Cursor1.pos <= utf8.len(Lines[Cursor1.line].data) then
    Cursor1.pos = Cursor1.pos+1
    [20.293]
    [20.738]
    assert(Editor_state.lines[Editor_state.cursor1.line].mode == 'text')
    if Editor_state.cursor1.pos <= utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) then
    Editor_state.cursor1.pos = Editor_state.cursor1.pos+1
  • replacement in text.lua at line 607
    [20.745][20.745:827]()
    local new_cursor_line = Cursor1.line
    while new_cursor_line <= #Lines-1 do
    [20.745]
    [20.827]
    local new_cursor_line = Editor_state.cursor1.line
    while new_cursor_line <= #Editor_state.lines-1 do
  • replacement in text.lua at line 610
    [20.869][20.869:984]()
    if Lines[new_cursor_line].mode == 'text' then
    Cursor1.line = new_cursor_line
    Cursor1.pos = 1
    [20.869]
    [20.984]
    if Editor_state.lines[new_cursor_line].mode == 'text' then
    Editor_state.cursor1.line = new_cursor_line
    Editor_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 do
    local spos = Lines[Cursor1.line].screen_line_starting_pos[i]
    if spos <= Cursor1.pos then
    [20.355]
    [20.1621]
    Text.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 do
    local 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.pos
    [20.115]
    [20.1933]
    Text.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_top
    while Cursor1.line <= #Lines do
    if Lines[Cursor1.line].mode == 'text' then
    [13.282]
    [20.166]
    local y = Editor_state.margin_top
    while Editor_state.cursor1.line <= #Editor_state.lines do
    if 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
    [20.186]
    [20.220]
    --? 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
    [20.287][20.6801:6870](),[20.6870][20.354:402](),[20.354][20.354:402]()
    if Cursor1.line > #Lines then
    assert(Cursor1.line == #Lines+1)
    table.insert(Lines, {mode='text', data=''})
    [20.287]
    [20.402]
    if Editor_state.cursor1.line > #Editor_state.lines then
    assert(Editor_state.cursor1.line == #Editor_state.lines+1)
    table.insert(Editor_state.lines, {mode='text', data=''})
  • replacement in text.lua at line 652
    [20.408][20.3537:3648]()
    --? print(y, App.screen.height, App.screen.height-Line_height)
    if y > App.screen.height - Line_height then
    [20.408]
    [20.1554]
    --? 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
    [20.540][20.294:325]()
    -- should never modify Cursor1
    [20.540]
    [20.599]
    -- should never modify Editor_state.cursor1
  • replacement in text.lua at line 661
    [20.658][15.247:293]()
    local top2 = Text.to2(Cursor1, left, right)
    [20.658]
    [20.533]
    local top2 = Text.to2(Editor_state.cursor1, left, right)
  • replacement in text.lua at line 663
    [20.580][20.95:210](),[20.95][20.95:210](),[20.210][20.3649:3693]()
    --? print('cursor pos '..tostring(Cursor1.pos)..' is on the #'..tostring(top2.screen_line)..' screen line down')
    local y = App.screen.height - Line_height
    [20.580]
    [20.455]
    --? 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
    [20.394][20.394:464](),[20.464][20.3694:3722](),[20.3722][20.1391:1424]()
    if top2.screen_line > 1 or Lines[top2.line-1].mode == 'text' then
    local h = Line_height
    if y - h < Margin_top then
    [20.394]
    [20.545]
    if top2.screen_line > 1 or Editor_state.lines[top2.line-1].mode == 'text' then
    local h = Editor_state.line_height
    if y - h < Editor_state.margin_top then
  • replacement in text.lua at line 677
    [20.614][20.614:665]()
    assert(Lines[top2.line-1].mode == 'drawing')
    [20.614]
    [20.665]
    assert(Editor_state.lines[top2.line-1].mode == 'drawing')
  • replacement in text.lua at line 680
    [20.767][20.245:323](),[20.323][20.1425:1458](),[20.59][20.1425:1458]()
    local h = Drawing_padding_height + Drawing.pixels(Lines[top2.line-1].h)
    if y - h < Margin_top then
    [20.767]
    [20.857]
    local 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
    [20.1066][20.1066:1161]()
    Screen_top1 = Text.to1(top2)
    --? print('top1 finally:', Screen_top1.line, Screen_top1.pos)
    [20.1066]
    [20.185]
    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
    [20.425][20.1130:1252](),[16.578][20.1130:1252](),[20.101][20.1130:1252]()
    return y < line.starty + Line_height*(#line.screen_line_starting_pos - Text.screen_line_index(line, line.startpos) + 1)
    [16.578]
    [20.95]
    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
    [20.1037][20.3874:3908](),[20.1478][20.3874:3908](),[20.133][20.3874:3908]()
    local nexty = y + Line_height
    [20.1037]
    [20.1098]
    local nexty = y + Editor_state.line_height
  • replacement in text.lua at line 741
    [20.1502][20.7669:7701]()
    -- Cursor1.pos = 4 + 2 - 1 = 5
    [20.1502]
    [20.1533]
    -- Editor_state.cursor1.pos = 4 + 2 - 1 = 5
  • replacement in text.lua at line 746
    [20.1643][20.7702:7734]()
    -- Cursor1.pos = 7 + 2 - 1 = 8
    [20.1643]
    [20.468]
    -- Editor_state.cursor1.pos = 7 + 2 - 1 = 8
  • replacement in text.lua at line 851
    [15.331][20.1:46](),[20.7759][20.1:46]()
    if Lines[pos1.line].mode == 'drawing' then
    [15.331]
    [20.46]
    if 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 do
    local spos = Lines[pos1.line].screen_line_starting_pos[i]
    [20.7808]
    [20.352]
    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 do
    local spos = Editor_state.lines[pos1.line].screen_line_starting_pos[i]
  • replacement in text.lua at line 871
    [20.8326][20.1286:1385]()
    result.pos = Lines[pos2.line].screen_line_starting_pos[pos2.screen_line] + pos2.screen_pos - 1
    [20.8326]
    [20.8421]
    result.pos = Editor_state.lines[pos2.line].screen_line_starting_pos[pos2.screen_line] + pos2.screen_pos - 1
  • replacement in text.lua at line 904
    [20.1005][20.1005:1095]()
    print(Cursor1.line, Cursor1.pos, #Lines[Cursor1.line].data, Lines[Cursor1.line].data)
    [20.1005]
    [20.1095]
    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
    [20.1582][20.1582:1633]()
    elseif Lines[pos2.line-1].mode == 'drawing' then
    [20.1582]
    [20.1633]
    elseif 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}
    [20.1699]
    [20.1960]
    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
    [20.489][20.47:123](),[20.47][20.47:123](),[20.182][20.182:221]()
    --? print('a', Selection1.line)
    if Screen_top1.pos == 1 then return end
    local line = Lines[Screen_top1.line]
    [20.489]
    [16.866]
    --? print('a', Editor_state.selection1.line)
    if Editor_state.screen_top1.pos == 1 then return end
    local line = Editor_state.lines[Editor_state.screen_top1.line]
  • replacement in text.lua at line 957
    [20.314][20.314:349]()
    if pos == Screen_top1.pos then
    [20.314]
    [20.349]
    if pos == Editor_state.screen_top1.pos then
  • replacement in text.lua at line 960
    [20.369][20.369:403]()
    if pos > Screen_top1.pos then
    [20.369]
    [20.403]
    if pos > Editor_state.screen_top1.pos then
  • replacement in text.lua at line 963
    [20.516][20.516:608]()
    if Screen_top1.pos - prev < pos - Screen_top1.pos then
    Screen_top1.pos = prev
    [20.516]
    [20.608]
    if Editor_state.screen_top1.pos - prev < pos - Editor_state.screen_top1.pos then
    Editor_state.screen_top1.pos = prev
  • replacement in text.lua at line 966
    [20.619][20.619:649]()
    Screen_top1.pos = pos
    [20.619]
    [20.649]
    Editor_state.screen_top1.pos = pos
  • replacement in text.lua at line 972
    [20.720][20.720:870]()
    if Text.lt1(Cursor1, Screen_top1) then
    Cursor1 = {line=Screen_top1.line, pos=Screen_top1.pos}
    elseif Cursor1.line >= Screen_bottom1.line then
    [20.720]
    [20.870]
    if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) then
    Editor_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
    [20.981][20.981:1027](),[20.1027][20.3:57]()
    local line = Lines[Screen_bottom1.line]
    Cursor1 = {
    line=Screen_bottom1.line,
    [20.981]
    [20.60]
    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
    [20.247][20.247:300]()
    return Cursor_y >= App.screen.height - Line_height
    [20.247]
    [20.300]
    return Editor_state.cursor_y >= App.screen.height - Editor_state.line_height
  • replacement in text.lua at line 994
    [20.432][20.484:587](),[20.484][20.484:587]()
    --? local botline1 = {line=Cursor1.line, pos=botpos}
    --? return Text.lt1(Screen_bottom1, botline1)
    [20.432]
    [20.1156]
    --? 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) do
    [20.732]
    [20.1828]
    for _,line in ipairs(Editor_state.lines) do
  • replacement in select.lua at line 3
    [20.44053][20.44053:44125]()
    -- Return any intersection of the region from Selection1 to Cursor1 (or
    [20.44053]
    [20.44125]
    -- Return any intersection of the region from Editor_state.selection1 to Editor_state.cursor1 (or
  • replacement in select.lua at line 7
    [20.44321][20.44321:44405]()
    -- apos must be less than bpos. However Selection1 and Cursor1 can be in any order.
    [20.44321]
    [20.44405]
    -- 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
    [20.305][20.44508:44653](),[20.44508][20.44508:44653]()
    if Selection1.line == nil then return nil,nil end
    -- min,max = sorted(Selection1,Cursor1)
    local minl,minp = Selection1.line,Selection1.pos
    [20.305]
    [20.44653]
    if 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
    [20.44744][20.44744:44785]()
    maxl,maxp = Cursor1.line,Cursor1.pos
    [20.44744]
    [20.44785]
    maxl,maxp = Editor_state.cursor1.line,Editor_state.cursor1.pos
  • replacement in select.lua at line 72
    [17.152][20.894:965](),[20.894][20.894:965]()
    love.graphics.rectangle('fill', x+lo_px,y, text_width,Line_height)
    [17.152]
    [17.153]
    love.graphics.rectangle('fill', x+lo_px,y, text_width,Editor_state.line_height)
  • replacement in select.lua at line 81
    [20.45938][20.45938:46046]()
    if Recent_mouse.time and Recent_mouse.time > time-0.1 then
    return Recent_mouse.line, Recent_mouse.pos
    [20.45938]
    [20.46046]
    if Editor_state.recent_mouse.time and Editor_state.recent_mouse.time > time-0.1 then
    return Editor_state.recent_mouse.line, Editor_state.recent_mouse.pos
  • replacement in select.lua at line 84
    [20.46052][20.46052:46079]()
    Recent_mouse.time = time
    [20.46052]
    [20.389]
    Editor_state.recent_mouse.time = time
  • replacement in select.lua at line 87
    [20.46163][20.46163:46219]()
    Recent_mouse.line = line
    Recent_mouse.pos = pos
    [20.46163]
    [20.46219]
    Editor_state.recent_mouse.line = line
    Editor_state.recent_mouse.pos = pos
  • replacement in select.lua at line 90
    [20.46225][20.46225:46270]()
    return Recent_mouse.line, Recent_mouse.pos
    [20.46225]
    [20.46270]
    return Editor_state.recent_mouse.line, Editor_state.recent_mouse.pos
  • replacement in select.lua at line 94
    [20.503][20.46301:46343](),[20.46301][20.46301:46343]()
    for line_index,line in ipairs(Lines) do
    [20.503]
    [20.46343]
    for line_index,line in ipairs(Editor_state.lines) do
  • replacement in select.lua at line 104
    [20.545][20.5:49](),[20.40][20.5:49]()
    if Selection1.line == nil then return end
    [20.545]
    [20.40]
    if 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 end
    local minl,maxl = minmax(Selection1.line, Cursor1.line)
    [20.628]
    [20.46591]
    if Editor_state.selection1.line == nil then return end
    local minl,maxl = minmax(Editor_state.selection1.line, Editor_state.cursor1.line)
  • replacement in select.lua at line 115
    [20.679][20.46668:46735](),[20.46668][20.46668:46735]()
    record_undo_event({before=before, after=snapshot(Cursor1.line)})
    [20.679]
    [20.46735]
    record_undo_event({before=before, after=snapshot(Editor_state.cursor1.line)})
  • replacement in select.lua at line 119
    [20.737][20.46786:46968](),[20.46786][20.46786:46968]()
    if Selection1.line == nil then return end
    -- min,max = sorted(Selection1,Cursor1)
    local minl,minp = Selection1.line,Selection1.pos
    local maxl,maxp = Cursor1.line,Cursor1.pos
    [20.737]
    [20.46968]
    if 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.pos
    local maxl,maxp = Editor_state.cursor1.line,Editor_state.cursor1.pos
  • replacement in select.lua at line 131
    [20.47135][20.47135:47213](),[20.47213][20.1017:1094](),[20.1094][20.435:512]()
    -- update Cursor1 and Selection1
    Cursor1.line = minl
    Cursor1.pos = minp
    if Text.lt1(Cursor1, Screen_top1) then
    Screen_top1.line = Cursor1.line
    _,Screen_top1.pos = Text.pos_at_start_of_cursor_screen_line(left, right)
    [20.47135]
    [20.1160]
    -- update Editor_state.cursor1 and Editor_state.selection1
    Editor_state.cursor1.line = minl
    Editor_state.cursor1.pos = minp
    if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) then
    Editor_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
    [20.1166][20.47213:47231](),[20.47213][20.47213:47231]()
    Selection1 = {}
    [20.1166]
    [20.47231]
    Editor_state.selection1 = {}
  • replacement in select.lua at line 140
    [20.47298][20.446:478](),[20.478][20.1310:1424](),[20.47373][20.1310:1424]()
    Text.clear_cache(Lines[minl])
    local min_offset = Text.offset(Lines[minl].data, minp)
    local max_offset = Text.offset(Lines[maxl].data, maxp)
    [20.47298]
    [20.47487]
    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
    [20.47540][20.47540:47635]()
    Lines[minl].data = Lines[minl].data:sub(1, min_offset-1)..Lines[minl].data:sub(max_offset)
    [20.47540]
    [20.47635]
    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
    [20.47674][20.47674:47721]()
    local rhs = Lines[maxl].data:sub(max_offset)
    [20.47674]
    [20.47721]
    local rhs = Editor_state.lines[maxl].data:sub(max_offset)
  • replacement in select.lua at line 151
    [20.47747][20.47747:47774]()
    table.remove(Lines, i)
    [20.47747]
    [20.47774]
    table.remove(Editor_state.lines, i)
  • replacement in select.lua at line 153
    [20.47780][20.47780:47844]()
    Lines[minl].data = Lines[minl].data:sub(1, min_offset-1)..rhs
    [20.47780]
    [20.47844]
    Editor_state.lines[minl].data = Editor_state.lines[minl].data:sub(1, min_offset-1)..rhs
  • replacement in select.lua at line 157
    [20.47875][20.47875:48057]()
    if Selection1.line == nil then return end
    -- min,max = sorted(Selection1,Cursor1)
    local minl,minp = Selection1.line,Selection1.pos
    local maxl,maxp = Cursor1.line,Cursor1.pos
    [20.47875]
    [20.48057]
    if 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.pos
    local maxl,maxp = Editor_state.cursor1.line,Editor_state.cursor1.pos
  • replacement in select.lua at line 169
    [20.48224][20.1425:1539]()
    local min_offset = Text.offset(Lines[minl].data, minp)
    local max_offset = Text.offset(Lines[maxl].data, maxp)
    [20.48224]
    [20.48338]
    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
    [20.48361][20.48361:48419]()
    return Lines[minl].data:sub(min_offset, max_offset-1)
    [20.48361]
    [20.48419]
    return Editor_state.lines[minl].data:sub(min_offset, max_offset-1)
  • replacement in select.lua at line 175
    [20.48447][20.5:57]()
    local result = {Lines[minl].data:sub(min_offset)}
    [20.48447]
    [20.48503]
    local result = {Editor_state.lines[minl].data:sub(min_offset)}
  • replacement in select.lua at line 177
    [20.48528][20.48528:48564](),[20.48564][20.58:100]()
    if Lines[i].mode == 'text' then
    table.insert(result, Lines[i].data)
    [20.48528]
    [20.48607]
    if Editor_state.lines[i].mode == 'text' then
    table.insert(result, Editor_state.lines[i].data)
  • replacement in select.lua at line 181
    [20.48621][20.101:163]()
    table.insert(result, Lines[maxl].data:sub(1, max_offset-1))
    [20.48621]
    [20.163]
    table.insert(result, Editor_state.lines[maxl].data:sub(1, max_offset-1))
  • replacement in search.lua at line 4
    [20.48916][20.48916:48942]()
    local h = Line_height+2
    [20.48916]
    [20.48942]
    local h = Editor_state.line_height+2
  • replacement in search.lua at line 15
    [17.205][20.49424:49464](),[20.49424][20.49424:49464]()
    App.screen.print(Search_term, 25,y-5)
    [17.205]
    [17.206]
    App.screen.print(Editor_state.search_term, 25,y-5)
  • replacement in search.lua at line 17
    [17.232][20.49496:49593](),[20.49496][20.49496:49593]()
    if Search_text == nil then
    Search_text = App.newText(love.graphics.getFont(), Search_term)
    [17.232]
    [20.49593]
    if Editor_state.search_text == nil then
    Editor_state.search_text = App.newText(love.graphics.getFont(), Editor_state.search_term)
  • replacement in search.lua at line 20
    [20.49599][20.49599:49666]()
    love.graphics.circle('fill', 25+App.width(Search_text),y-5+h, 2)
    [20.49599]
    [17.233]
    love.graphics.circle('fill', 25+App.width(Editor_state.search_text),y-5+h, 2)
  • replacement in search.lua at line 26
    [20.49756][20.49756:49826]()
    local pos = Lines[Cursor1.line].data:find(Search_term, Cursor1.pos)
    [20.49756]
    [20.49826]
    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
    [20.49840][20.49840:49862]()
    Cursor1.pos = pos
    [20.49840]
    [20.49862]
    Editor_state.cursor1.pos = pos
  • replacement in search.lua at line 31
    [20.49889][20.49889:49968]()
    for i=Cursor1.line+1,#Lines do
    pos = Lines[i].data:find(Search_term)
    [20.49889]
    [20.49968]
    for i=Editor_state.cursor1.line+1,#Editor_state.lines do
    pos = Editor_state.lines[i].data:find(Editor_state.search_term)
  • replacement in search.lua at line 34
    [20.49986][20.49986:50037]()
    Cursor1.line = i
    Cursor1.pos = pos
    [20.49986]
    [20.50037]
    Editor_state.cursor1.line = i
    Editor_state.cursor1.pos = pos
  • replacement in search.lua at line 42
    [20.50115][20.50115:50189]()
    for i=1,Cursor1.line-1 do
    pos = Lines[i].data:find(Search_term)
    [20.50115]
    [20.50189]
    for i=1,Editor_state.cursor1.line-1 do
    pos = Editor_state.lines[i].data:find(Editor_state.search_term)
  • replacement in search.lua at line 45
    [20.50207][20.50207:50258]()
    Cursor1.line = i
    Cursor1.pos = pos
    [20.50207]
    [20.50258]
    Editor_state.cursor1.line = i
    Editor_state.cursor1.pos = pos
  • replacement in search.lua at line 52
    [20.50317][20.50317:50509]()
    Cursor1.line = Search_backup.cursor.line
    Cursor1.pos = Search_backup.cursor.pos
    Screen_top1.line = Search_backup.screen_top.line
    Screen_top1.pos = Search_backup.screen_top.pos
    [20.50317]
    [20.50509]
    Editor_state.cursor1.line = Editor_state.search_backup.cursor.line
    Editor_state.cursor1.pos = Editor_state.search_backup.cursor.pos
    Editor_state.screen_top1.line = Editor_state.search_backup.screen_top.line
    Editor_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) then
    Screen_top1.line = Cursor1.line
    local _, pos = Text.pos_at_start_of_cursor_screen_line(Margin_left, App.screen.width-Margin_right)
    Screen_top1.pos = pos
    [20.50515]
    [20.50716]
    if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) or Text.lt1(Editor_state.screen_bottom1, Editor_state.cursor1) then
    Editor_state.screen_top1.line = Editor_state.cursor1.line
    local _, 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
    [20.50784][20.50784:50856]()
    local pos = rfind(Lines[Cursor1.line].data, Search_term, Cursor1.pos)
    [20.50784]
    [20.50856]
    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
    [20.50870][20.50870:50892]()
    Cursor1.pos = pos
    [20.50870]
    [20.50892]
    Editor_state.cursor1.pos = pos
  • replacement in search.lua at line 71
    [20.50919][20.50919:50998]()
    for i=Cursor1.line-1,1,-1 do
    pos = rfind(Lines[i].data, Search_term)
    [20.50919]
    [20.50998]
    for i=Editor_state.cursor1.line-1,1,-1 do
    pos = rfind(Editor_state.lines[i].data, Editor_state.search_term)
  • replacement in search.lua at line 74
    [20.51016][20.51016:51067]()
    Cursor1.line = i
    Cursor1.pos = pos
    [20.51016]
    [20.51067]
    Editor_state.cursor1.line = i
    Editor_state.cursor1.pos = pos
  • replacement in search.lua at line 82
    [20.51145][20.51145:51229]()
    for i=#Lines,Cursor1.line+1,-1 do
    pos = rfind(Lines[i].data, Search_term)
    [20.51145]
    [20.51229]
    for i=#Editor_state.lines,Editor_state.cursor1.line+1,-1 do
    pos = rfind(Editor_state.lines[i].data, Editor_state.search_term)
  • replacement in search.lua at line 85
    [20.51247][20.51247:51298]()
    Cursor1.line = i
    Cursor1.pos = pos
    [20.51247]
    [20.51298]
    Editor_state.cursor1.line = i
    Editor_state.cursor1.pos = pos
  • replacement in search.lua at line 92
    [20.51357][20.51357:51549]()
    Cursor1.line = Search_backup.cursor.line
    Cursor1.pos = Search_backup.cursor.pos
    Screen_top1.line = Search_backup.screen_top.line
    Screen_top1.pos = Search_backup.screen_top.pos
    [20.51357]
    [20.51549]
    Editor_state.cursor1.line = Editor_state.search_backup.cursor.line
    Editor_state.cursor1.pos = Editor_state.search_backup.cursor.pos
    Editor_state.screen_top1.line = Editor_state.search_backup.screen_top.line
    Editor_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) then
    Screen_top1.line = Cursor1.line
    local _, pos = Text.pos_at_start_of_cursor_screen_line(Margin_left, App.screen.width-Margin_right)
    Screen_top1.pos = pos
    [20.51555]
    [20.51756]
    if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) or Text.lt1(Editor_state.screen_bottom1, Editor_state.cursor1) then
    Editor_state.screen_top1.line = Editor_state.cursor1.line
    local _, 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
    [20.73][20.73:232]()
    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')
    [20.73]
    [20.232]
    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
    [20.64][20.64:117]()
    App.screen.init{width=Margin_left+300, height=300}
    [20.64]
    [20.117]
    App.screen.init{width=Editor_state.margin_left+300, height=300}
  • replacement in main_tests.lua at line 34
    [20.631][20.631:871]()
    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')
    [20.631]
    [10.7]
    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
    [10.99][10.99:152]()
    App.screen.init{width=Margin_left+300, height=300}
    [10.99]
    [10.152]
    App.screen.init{width=Editor_state.margin_left+300, height=300}
  • replacement in main_tests.lua at line 44
    [10.234][10.234:288]()
    Lines = load_array{'abc', 'def'}
    Filename = 'foo'
    [10.234]
    [10.288]
    Editor_state.lines = load_array{'abc', 'def'}
    Editor_state.filename = 'foo'
  • replacement in main.lua at line 17
    [20.1566][19.8:36]()
    edit.initialize_globals()
    [20.1566]
    [19.36]
    Editor_state = edit.initialize_state()
  • replacement in main.lua at line 40
    [20.63][20.609:631](),[20.631][20.149:285]()
    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) do
    [20.63]
    [20.285]
    Editor_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
    [20.319][20.319:344]()
    Cursor1.line = i
    [20.319]
    [20.344]
    Editor_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' then
    for i,line in ipairs(Lines) do
    [20.383]
    [20.504]
    Editor_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' then
    for i,line in ipairs(Editor_state.lines) do
  • replacement in main.lua at line 55
    [20.540][20.540:567]()
    Cursor1.line = i
    [20.540]
    [20.567]
    Editor_state.cursor1.line = i
  • replacement in main.lua at line 61
    [20.466][3.8:58]()
    love.window.setTitle('lines.love - '..Filename)
    [20.466]
    [20.8]
    love.window.setTitle('lines.love - '..Editor_state.filename)
  • replacement in main.lua at line 86
    [11.517][20.903:934](),[20.903][20.903:934]()
    Filename = settings.filename
    [11.517]
    [20.934]
    Editor_state.filename = settings.filename
  • replacement in main.lua at line 88
    [20.983][20.983:1047]()
    Screen_top1 = settings.screen_top
    Cursor1 = settings.cursor
    [20.983]
    [20.1047]
    Editor_state.screen_top1 = settings.screen_top
    Editor_state.cursor1 = settings.cursor
  • replacement in main.lua at line 102
    [20.274][20.72:110]()
    App.screen.width = 40*App.width(Em)
    [20.274]
    [20.316]
    App.screen.width = 40*App.width(Editor_state.em)
  • replacement in main.lua at line 114
    [20.217][20.1274:1343](),[20.1343][20.495:575]()
    Selection1 = {} -- no support for shift drag while we're resizing
    Text.tweak_screen_top_and_cursor(Margin_left, App.screen.height-Margin_right)
    [20.217]
    [20.154]
    Editor_state.selection1 = {} -- no support for shift drag while we're resizing
    Text.tweak_screen_top_and_cursor(Editor_state.margin_left, App.screen.height-Editor_state.margin_right)
  • replacement in main.lua at line 120
    [20.88][20.88:220]()
    Font_height = font_height
    love.graphics.setFont(love.graphics.newFont(Font_height))
    Line_height = math.floor(font_height*1.3)
    [20.88]
    [20.220]
    Editor_state.font_height = font_height
    love.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
    [20.221][20.90:139]()
    Em = App.newText(love.graphics.getFont(), 'm')
    [20.221]
    [20.440]
    Editor_state.em = App.newText(love.graphics.getFont(), 'm')
  • replacement in main.lua at line 129
    [10.1059][10.1059:1113]()
    if Next_save then
    save_to_disk(Lines, Filename)
    [10.1059]
    [10.1113]
    if Editor_state.next_save then
    save_to_disk(Editor_state.lines, Editor_state.filename)
  • replacement in main.lua at line 134
    [20.1352][20.747:779](),[20.8235][20.747:779](),[20.39][20.747:779]()
    Filename = file:getFilename()
    [20.8235]
    [20.71]
    Editor_state.filename = file:getFilename()
  • replacement in main.lua at line 136
    [20.88][20.146:177]()
    Lines = load_from_file(file)
    [20.88]
    [20.1]
    Editor_state.lines = load_from_file(file)
  • replacement in main.lua at line 138
    [20.16][20.178:211]()
    for i,line in ipairs(Lines) do
    [20.16]
    [20.500]
    for i,line in ipairs(Editor_state.lines) do
  • replacement in main.lua at line 140
    [20.532][20.9223:9246]()
    Cursor1.line = i
    [20.532]
    [20.16]
    Editor_state.cursor1.line = i
  • replacement in main.lua at line 144
    [20.568][20.803:858]()
    love.window.setTitle('Text with Lines - '..Filename)
    [20.568]
    [20.183]
    love.window.setTitle('Text with Editor_state.lines - '..Editor_state.filename)
  • replacement in main.lua at line 169
    [20.135][20.8:36]()
    local filename = Filename
    [20.135]
    [20.36]
    local filename = Editor_state.filename
  • replacement in main.lua at line 176
    [20.251][20.8:37]()
    font_height=Font_height,
    [20.251]
    [20.182]
    font_height=Editor_state.font_height,
  • replacement in main.lua at line 178
    [20.205][20.140:184](),[20.140][20.140:184]()
    screen_top=Screen_top1, cursor=Cursor1}
    [20.205]
    [20.339]
    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_height
    love.graphics.print("* Press the mouse button to start drawing a "..current_shape(), Margin_left+30,y)
    y = y + Line_height
    love.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_height
    love.graphics.print("then press the mouse button to drop it", Margin_left+30+bullet_indent(),y)
    y = y + Line_height
    love.graphics.print("* Hover on a point and press 'ctrl+n', type a name, then press 'enter'", Margin_left+30,y)
    y = y + Line_height
    love.graphics.print("* Hover on a point or shape and press 'ctrl+d' to delete it", Margin_left+30,y)
    y = y + Line_height
    if Current_drawing_mode ~= 'freehand' then
    love.graphics.print("* Press 'ctrl+p' to switch to drawing freehand strokes", Margin_left+30,y)
    y = y + Line_height
    [20.6732]
    [20.7459]
    love.graphics.print("Things you can do:", Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    love.graphics.print("* Press the mouse button to start drawing a "..current_shape(), Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    love.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_height
    love.graphics.print("then press the mouse button to drop it", Editor_state.margin_left+30+bullet_indent(),y)
    y = y + Editor_state.line_height
    love.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_height
    love.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_height
    if Editor_state.current_drawing_mode ~= 'freehand' then
    love.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' then
    love.graphics.print("* Press 'ctrl+l' to switch to drawing lines", Margin_left+30,y)
    y = y + Line_height
    [20.7465]
    [20.7613]
    if Editor_state.current_drawing_mode ~= 'line' then
    love.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' then
    love.graphics.print("* Press 'ctrl+m' to switch to drawing horizontal/vertical lines", Margin_left+30,y)
    y = y + Line_height
    [20.7619]
    [20.7792]
    if Editor_state.current_drawing_mode ~= 'manhattan' then
    love.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' then
    love.graphics.print("* Press 'ctrl+o' to switch to drawing circles/arcs", Margin_left+30,y)
    y = y + Line_height
    [20.7798]
    [20.7955]
    if Editor_state.current_drawing_mode ~= 'circle' then
    love.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' then
    love.graphics.print("* Press 'ctrl+g' to switch to drawing polygons", Margin_left+30,y)
    y = y + Line_height
    [20.7961]
    [20.422]
    if Editor_state.current_drawing_mode ~= 'polygon' then
    love.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' then
    love.graphics.print("* Press 'ctrl+r' to switch to drawing rectangles", Margin_left+30,y)
    y = y + Line_height
    [20.428]
    [20.586]
    if Editor_state.current_drawing_mode ~= 'rectangle' then
    love.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' then
    love.graphics.print("* Press 'ctrl+s' to switch to drawing squares", Margin_left+30,y)
    y = y + Line_height
    [20.592]
    [20.8115]
    if Editor_state.current_drawing_mode ~= 'square' then
    love.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_height
    love.graphics.print("Press 'esc' now to hide this message", Margin_left+30,y)
    y = y + Line_height
    [20.8121]
    [17.314]
    love.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_height
    love.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
    [17.349][20.12:149](),[20.8466][20.12:149]()
    love.graphics.rectangle('fill', Margin_left,drawing.y, App.screen.width-Margin_width, math.max(Drawing.pixels(drawing.h),y-drawing.y))
    [17.349]
    [20.8578]
    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_height
    love.graphics.print('Things you can do now:', Margin_left+30,y)
    y = y + Line_height
    if Current_drawing_mode == 'freehand' then
    love.graphics.print('* Release the mouse button to finish drawing the stroke', Margin_left+30,y)
    y = y + Line_height
    elseif Current_drawing_mode == 'line' or Current_drawing_mode == 'manhattan' then
    love.graphics.print('* Release the mouse button to finish drawing the line', Margin_left+30,y)
    y = y + Line_height
    elseif Current_drawing_mode == 'circle' then
    [20.8689]
    [20.9302]
    love.graphics.print("You're currently drawing a "..current_shape(drawing.pending), Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    love.graphics.print('Things you can do now:', Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    if Editor_state.current_drawing_mode == 'freehand' then
    love.graphics.print('* Release the mouse button to finish drawing the stroke', Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    elseif Editor_state.current_drawing_mode == 'line' or Editor_state.current_drawing_mode == 'manhattan' then
    love.graphics.print('* Release the mouse button to finish drawing the line', Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    elseif 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_height
    love.graphics.print("* Press 'a' to draw just an arc of a circle", Margin_left+30,y)
    [20.9347]
    [20.9561]
    love.graphics.print('* Release the mouse button to finish drawing the circle', Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    love.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
    [20.9570][20.2175:2275]()
    love.graphics.print('* Release the mouse button to finish drawing the arc', Margin_left+30,y)
    [20.9570]
    [20.9670]
    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_height
    elseif Current_drawing_mode == 'polygon' then
    love.graphics.print('* Release the mouse button to finish drawing the polygon', Margin_left+30,y)
    y = y + Line_height
    love.graphics.print("* Press 'p' to add a vertex to the polygon", Margin_left+30,y)
    y = y + Line_height
    elseif Current_drawing_mode == 'rectangle' then
    [20.9678]
    [20.62]
    y = y + Editor_state.line_height
    elseif Editor_state.current_drawing_mode == 'polygon' then
    love.graphics.print('* Release the mouse button to finish drawing the polygon', Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    love.graphics.print("* Press 'p' to add a vertex to the polygon", Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    elseif Editor_state.current_drawing_mode == 'rectangle' then
  • replacement in help.lua at line 81
    [20.104][20.104:222]()
    love.graphics.print("* Press 'p' to add a vertex to the rectangle", Margin_left+30,y)
    y = y + Line_height
    [20.104]
    [20.222]
    love.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_height
    love.graphics.print("* Press 'p' to replace the second vertex of the rectangle", Margin_left+30,y)
    y = y + Line_height
    [20.231]
    [20.495]
    love.graphics.print('* Release the mouse button to finish drawing the rectangle', Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    love.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
    [20.503][20.503:550]()
    elseif Current_drawing_mode == 'square' then
    [20.503]
    [20.550]
    elseif Editor_state.current_drawing_mode == 'square' then
  • replacement in help.lua at line 91
    [20.592][20.592:707]()
    love.graphics.print("* Press 'p' to add a vertex to the square", Margin_left+30,y)
    y = y + Line_height
    [20.592]
    [20.707]
    love.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_height
    love.graphics.print("* Press 'p' to replace the second vertex of the square", Margin_left+30,y)
    y = y + Line_height
    [20.716]
    [20.974]
    love.graphics.print('* Release the mouse button to finish drawing the square', Editor_state.margin_left+30,y)
    y = y + Editor_state.line_height
    love.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_height
    y = y + Line_height
    if Current_drawing_mode ~= 'line' then
    love.graphics.print("* Press 'l' to switch to drawing lines", Margin_left+30,y)
    y = y + Line_height
    [20.9976]
    [20.10266]
    love.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_height
    y = y + Editor_state.line_height
    if Editor_state.current_drawing_mode ~= 'line' then
    love.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' then
    love.graphics.print("* Press 'm' to switch to drawing horizontal/vertical lines", Margin_left+30,y)
    y = y + Line_height
    [20.10272]
    [20.10440]
    if Editor_state.current_drawing_mode ~= 'manhattan' then
    love.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' then
    love.graphics.print("* Press 'o' to switch to drawing circles/arcs", Margin_left+30,y)
    y = y + Line_height
    [20.10446]
    [20.10598]
    if Editor_state.current_drawing_mode ~= 'circle' then
    love.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' then
    love.graphics.print("* Press 'g' to switch to drawing polygons", Margin_left+30,y)
    y = y + Line_height
    [20.10604]
    [20.745]
    if Editor_state.current_drawing_mode ~= 'polygon' then
    love.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' then
    love.graphics.print("* Press 'r' to switch to drawing rectangles", Margin_left+30,y)
    y = y + Line_height
    [20.751]
    [20.904]
    if Editor_state.current_drawing_mode ~= 'rectangle' then
    love.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' then
    love.graphics.print("* Press 's' to switch to drawing squares", Margin_left+30,y)
    y = y + Line_height
    [20.910]
    [20.10753]
    if Editor_state.current_drawing_mode ~= 'square' then
    love.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
    [17.410][20.150:287](),[20.10798][20.150:287]()
    love.graphics.rectangle('fill', Margin_left,drawing.y, App.screen.width-Margin_width, math.max(Drawing.pixels(drawing.h),y-drawing.y))
    [17.410]
    [20.10910]
    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
    [20.10945][20.10945:10990]()
    if Current_drawing_mode == 'freehand' then
    [20.10945]
    [20.10990]
    if Editor_state.current_drawing_mode == 'freehand' then
  • replacement in help.lua at line 134
    [20.11019][20.11019:11064]()
    elseif Current_drawing_mode == 'line' then
    [20.11019]
    [20.11064]
    elseif Editor_state.current_drawing_mode == 'line' then
  • replacement in help.lua at line 136
    [20.11091][20.11091:11141]()
    elseif Current_drawing_mode == 'manhattan' then
    [20.11091]
    [20.11141]
    elseif Editor_state.current_drawing_mode == 'manhattan' then
  • replacement in help.lua at line 138
    [20.11179][20.11179:11258]()
    elseif Current_drawing_mode == 'circle' and shape and shape.start_angle then
    [20.11179]
    [20.11258]
    elseif Editor_state.current_drawing_mode == 'circle' and shape and shape.start_angle then
  • replacement in help.lua at line 141
    [20.11282][20.11282:11314]()
    return Current_drawing_mode
    [20.11282]
    [20.11314]
    return Editor_state.current_drawing_mode
  • replacement in edit.lua at line 25
    [20.596][20.596:1993]()
    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=''}}
    [20.596]
    [20.1993]
    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
    [20.1994][20.1994:2846]()
    -- 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 screen
    Cursor1 = {line=1, pos=1} -- position of cursor
    Screen_bottom1 = {line=1, pos=1} -- position of start of screen line at bottom of screen
    [20.1994]
    [20.2846]
    -- 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 screen
    cursor1 = {line=1, pos=1}, -- position of cursor
    screen_bottom1 = {line=1, pos=1}, -- position of start of screen line at bottom of screen
  • replacement in edit.lua at line 70
    [20.2847][20.2847:3083]()
    Selection1 = {}
    Old_cursor1, Old_selection1, Mousepress_shift = nil -- some extra state to compute selection between mouse press and release
    Recent_mouse = {} -- when selecting text, avoid recomputing some state on every single frame
    [20.2847]
    [20.3083]
    selection1 = {},
    -- some extra state to compute selection between mouse press and release
    old_cursor1 = nil,
    old_selection1 = nil,
    mousepress_shift = nil,
    -- when selecting text, avoid recomputing some state on every single frame
    recent_mouse = {},
  • replacement in edit.lua at line 78
    [20.3084][20.3084:3183]()
    Cursor_x, Cursor_y = 0, 0 -- in pixels
    Current_drawing_mode = 'line'
    Previous_drawing_mode = nil
    [20.3084]
    [20.3183]
    -- cursor coordinates in pixels
    cursor_x = 0,
    cursor_y = 0,
  • replacement in edit.lua at line 82
    [20.3184][20.3184:3320]()
    -- values for tests
    Font_height = 14
    Line_height = 15
    -- widest possible character width
    Em = App.newText(love.graphics.getFont(), 'm')
    [20.3184]
    [20.3320]
    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
    [20.3321][20.3321:3414]()
    Margin_top = 15
    Margin_left = 25
    Margin_right = 25
    Margin_width = Margin_left + Margin_right
    [20.3321]
    [20.3414]
    -- these default values are important for tests
    font_height = 14,
    line_height = 15,
    -- widest possible character width
    em = App.newText(love.graphics.getFont(), 'm'),
  • replacement in edit.lua at line 91
    [20.3415][20.3415:3538]()
    Drawing_padding_top = 10
    Drawing_padding_bottom = 10
    Drawing_padding_height = Drawing_padding_top + Drawing_padding_bottom
    [20.3415]
    [20.3538]
    margin_top = 15,
    margin_left = 25,
    margin_right = 25,
    margin_width = nil,
  • replacement in edit.lua at line 96
    [20.3539][20.3539:3615]()
    Filename = love.filesystem.getUserDirectory()..'/lines.txt'
    Next_save = nil
    [20.3539]
    [20.3615]
    drawing_padding_top = 10,
    drawing_padding_bottom = 10,
    drawing_padding_height = nil,
  • replacement in edit.lua at line 100
    [20.3616][20.3616:3654]()
    -- undo
    History = {}
    Next_history = 1
    [20.3616]
    [20.3654]
    filename = love.filesystem.getUserDirectory()..'/lines.txt',
    next_save = nil,
  • replacement in edit.lua at line 103
    [20.3655][20.3655:3765]()
    -- search
    Search_term = nil
    Search_text = nil
    Search_backup = nil -- stuff to restore when cancelling search
    [20.3655]
    [20.3835]
    -- undo
    history = {},
    next_history = 1,
  • replacement in edit.lua at line 107
    [20.3836][20.3836:3867]()
    end -- App.initialize_globals
    [20.3836]
    [20.3867]
    -- search
    search_term = nil,
    search_text = nil,
    search_backup = nil, -- stuff to restore when cancelling search
    }
    result.margin_width = result.margin_left + result.margin_right
    result.drawing_padding_height = result.drawing_padding_top + result.drawing_padding_bottom
    return result
    end -- App.initialize_state
  • replacement in edit.lua at line 119
    [17.1023][20.3947:4101](),[20.3947][20.3947:4101]()
    --? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos)
    assert(Text.le1(Screen_top1, Cursor1))
    Cursor_y = -1
    local y = Margin_top
    [17.1023]
    [20.4101]
    --? 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 = -1
    local y = Editor_state.margin_top
  • replacement in edit.lua at line 124
    [20.4124][20.4124:4205]()
    for line_index = Screen_top1.line,#Lines do
    local line = Lines[line_index]
    [20.4124]
    [20.4205]
    for line_index = Editor_state.screen_top1.line,#Editor_state.lines do
    local line = Editor_state.lines[line_index]
  • replacement in edit.lua at line 127
    [20.4249][20.4249:4344]()
    if y + Line_height > App.screen.height then break end
    Screen_bottom1.line = line_index
    [20.4249]
    [20.4344]
    if y + Editor_state.line_height > App.screen.height then break end
    Editor_state.screen_bottom1.line = line_index
  • replacement in edit.lua at line 137
    [20.4668][20.4668:4896]()
    table.insert(Lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})
    if Cursor1.line >= line_index then
    Cursor1.line = Cursor1.line+1
    [20.4668]
    [20.4896]
    table.insert(Editor_state.lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})
    if Editor_state.cursor1.line >= line_index then
    Editor_state.cursor1.line = Editor_state.cursor1.line+1
  • replacement in edit.lua at line 145
    [20.5098][20.5098:5217]()
    if Search_term == nil then
    if line_index == Cursor1.line then
    Text.draw_cursor(Margin_left, y)
    [20.5098]
    [20.5217]
    if Editor_state.search_term == nil then
    if line_index == Editor_state.cursor1.line then
    Text.draw_cursor(Editor_state.margin_left, y)
  • replacement in edit.lua at line 150
    [20.5239][20.5239:5308]()
    Screen_bottom1.pos = Screen_top1.pos
    y = y + Line_height
    [20.5239]
    [20.5308]
    Editor_state.screen_bottom1.pos = Editor_state.screen_top1.pos
    y = y + Editor_state.line_height
  • replacement in edit.lua at line 153
    [20.5347][20.5347:5379]()
    y = y+Drawing_padding_top
    [20.5347]
    [20.5379]
    y = y+Editor_state.drawing_padding_top
  • replacement in edit.lua at line 156
    [20.5421][20.5421:5483]()
    y = y + Drawing.pixels(line.h) + Drawing_padding_bottom
    [20.5421]
    [20.5483]
    y = y + Drawing.pixels(line.h) + Editor_state.drawing_padding_bottom
  • replacement in edit.lua at line 160
    [20.5538][20.5538:5623]()
    if line_index == Screen_top1.line then
    line.startpos = Screen_top1.pos
    [20.5538]
    [20.5623]
    if line_index == Editor_state.screen_top1.line then
    line.startpos = Editor_state.screen_top1.pos
  • replacement in edit.lua at line 164
    [20.5677][20.5677:5818]()
    y, Screen_bottom1.pos = Text.draw(line, line_index, line.starty, Margin_left, App.screen.width-Margin_right)
    y = y + Line_height
    [20.5677]
    [20.5818]
    y, 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
    [20.5859][20.5859:5917]()
    if Cursor_y == -1 then
    Cursor_y = App.screen.height
    [20.5859]
    [20.5917]
    if Editor_state.cursor_y == -1 then
    Editor_state.cursor_y = App.screen.height
  • replacement in edit.lua at line 172
    [20.5923][20.5923:6057]()
    --? print('screen bottom: '..tostring(Screen_bottom1.pos)..' in '..tostring(Lines[Screen_bottom1.line].data))
    if Search_term then
    [20.5923]
    [20.6057]
    --? 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
    [20.6353][20.6353:6457]()
    if Next_save and Next_save < App.getTime() then
    save_to_disk(Lines, Filename)
    Next_save = nil
    [20.6353]
    [20.6457]
    if Editor_state.next_save and Editor_state.next_save < App.getTime() then
    save_to_disk(Editor_state.lines, Editor_state.filename)
    Editor_state.next_save = nil
  • replacement in edit.lua at line 187
    [20.6493][20.6493:6621]()
    if Next_save == nil then
    Next_save = App.getTime() + 3 -- short enough that you're likely to still remember what you did
    [20.6493]
    [20.6621]
    if Editor_state.next_save == nil then
    Editor_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
    [20.6692][20.6692:6746]()
    if Next_save then
    save_to_disk(Lines, Filename)
    [20.6692]
    [20.6746]
    if Editor_state.next_save then
    save_to_disk(Editor_state.lines, Editor_state.filename)
  • replacement in edit.lua at line 200
    [20.6804][20.6804:6837](),[20.6912][20.6912:6966]()
    if Search_term then return end
    --? print('press', Selection1.line, Selection1.pos)
    [20.6804]
    [20.6966]
    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
    [20.7017][20.7017:7059]()
    for line_index,line in ipairs(Lines) do
    [20.7017]
    [20.7059]
    for line_index,line in ipairs(Editor_state.lines) do
  • replacement in edit.lua at line 206
    [20.7091][20.7091:7173]()
    if Text.in_line(line, x,y, Margin_left, App.screen.width-Margin_right) then
    [20.7091]
    [20.7173]
    if 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
    [20.7697][20.7697:7830]()
    Old_cursor1 = Cursor1
    Old_selection1 = Selection1
    Mousepress_shift = App.shift_down()
    Selection1 = {
    [20.7697]
    [20.7830]
    Editor_state.old_cursor1 = Editor_state.cursor1
    Editor_state.old_selection1 = Editor_state.selection1
    Editor_state.mousepress_shift = App.shift_down()
    Editor_state.selection1 = {
  • replacement in edit.lua at line 221
    [20.7859][20.7859:7952]()
    pos=Text.to_pos_on_line(line, x, y, Margin_left, App.screen.width-Margin_right),
    [20.7859]
    [20.7952]
    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
    [20.7962][20.7962:8026]()
    --? print('selection', Selection1.line, Selection1.pos)
    [20.7962]
    [20.8026]
    --? print('selection', Editor_state.selection1.line, Editor_state.selection1.pos)
  • replacement in edit.lua at line 228
    [20.8134][20.8134:8220]()
    Lines.current_drawing_index = line_index
    Lines.current_drawing = line
    [20.8134]
    [20.8220]
    Editor_state.lines.current_drawing_index = line_index
    Editor_state.lines.current_drawing = line
  • replacement in edit.lua at line 239
    [20.8412][20.8412:8445]()
    if Search_term then return end
    [20.8412]
    [20.8445]
    if Editor_state.search_term then return end
  • replacement in edit.lua at line 241
    [20.8543][20.8543:8575]()
    if Lines.current_drawing then
    [20.8468]
    [20.8575]
    if Editor_state.lines.current_drawing then
  • replacement in edit.lua at line 245
    [20.8668][20.8668:8762]()
    record_undo_event({before=Drawing.before, after=snapshot(Lines.current_drawing_index)})
    [20.8668]
    [20.8762]
    record_undo_event({before=Drawing.before, after=snapshot(Editor_state.lines.current_drawing_index)})
  • replacement in edit.lua at line 249
    [20.8804][20.8804:8848]()
    for line_index,line in ipairs(Lines) do
    [20.8804]
    [20.8848]
    for line_index,line in ipairs(Editor_state.lines) do
  • replacement in edit.lua at line 251
    [20.8882][20.8882:8966]()
    if Text.in_line(line, x,y, Margin_left, App.screen.width-Margin_right) then
    [20.8882]
    [20.8966]
    if 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
    [20.9005][20.9005:9027]()
    Cursor1 = {
    [20.9005]
    [20.9027]
    Editor_state.cursor1 = {
  • replacement in edit.lua at line 255
    [20.9058][20.9058:9153]()
    pos=Text.to_pos_on_line(line, x, y, Margin_left, App.screen.width-Margin_right),
    [20.9058]
    [20.9153]
    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
    [20.9165][20.9165:9343]()
    --? print('cursor', Cursor1.line, Cursor1.pos)
    if Mousepress_shift then
    if Old_selection1.line == nil then
    Selection1 = Old_cursor1
    [20.9165]
    [20.9343]
    --? print('cursor', Editor_state.cursor1.line, Editor_state.cursor1.pos)
    if Editor_state.mousepress_shift then
    if Editor_state.old_selection1.line == nil then
    Editor_state.selection1 = Editor_state.old_cursor1
  • replacement in edit.lua at line 262
    [20.9360][20.9360:9402]()
    Selection1 = Old_selection1
    [20.9360]
    [20.9402]
    Editor_state.selection1 = Editor_state.old_selection1
  • replacement in edit.lua at line 265
    [20.9432][20.9432:9564]()
    Old_cursor1, Old_selection1, Mousepress_shift = nil
    if eq(Cursor1, Selection1) then
    Selection1 = {}
    [20.9432]
    [20.9564]
    Editor_state.old_cursor1, Editor_state.old_selection1, Editor_state.mousepress_shift = nil
    if eq(Editor_state.cursor1, Editor_state.selection1) then
    Editor_state.selection1 = {}
  • replacement in edit.lua at line 273
    [20.9624][20.9624:9685]()
    --? print('selection:', Selection1.line, Selection1.pos)
    [20.9624]
    [20.9685]
    --? print('selection:', Editor_state.selection1.line, Editor_state.selection1.pos)
  • replacement in edit.lua at line 278
    [20.9798][20.9798:9952]()
    for _,line in ipairs(Lines) do line.y = nil end -- just in case we scroll
    if Search_term then
    Search_term = Search_term..t
    Search_text = nil
    [20.9723]
    [20.9952]
    for _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll
    if Editor_state.search_term then
    Editor_state.search_term = Editor_state.search_term..t
    Editor_state.search_text = nil
  • replacement in edit.lua at line 283
    [20.9975][20.9975:10119]()
    elseif Current_drawing_mode == 'name' then
    local before = snapshot(Lines.current_drawing_index)
    local drawing = Lines.current_drawing
    [20.9975]
    [20.10119]
    elseif Editor_state.current_drawing_mode == 'name' then
    local before = snapshot(Editor_state.lines.current_drawing_index)
    local drawing = Editor_state.lines.current_drawing
  • replacement in edit.lua at line 288
    [20.10201][20.10201:10285]()
    record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)})
    [20.10201]
    [20.10285]
    record_undo_event({before=before, after=snapshot(Editor_state.lines.current_drawing_index)})
  • replacement in edit.lua at line 296
    [20.10461][20.10461:10522]()
    if Selection1.line and
    not Lines.current_drawing and
    [20.10386]
    [20.10522]
    if Editor_state.selection1.line and
    not Editor_state.lines.current_drawing and
  • replacement in edit.lua at line 302
    [20.10886][20.10886:10956]()
    Text.delete_selection(Margin_left, App.screen.width-Margin_right)
    [20.10886]
    [20.10956]
    Text.delete_selection(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in edit.lua at line 304
    [20.10962][20.10962:10984]()
    if Search_term then
    [20.10962]
    [20.10984]
    if Editor_state.search_term then
  • replacement in edit.lua at line 306
    [20.11014][20.11014:11170]()
    Search_term = nil
    Search_text = nil
    Cursor1 = Search_backup.cursor
    Screen_top1 = Search_backup.screen_top
    Search_backup = nil
    [20.11014]
    [20.11170]
    Editor_state.search_term = nil
    Editor_state.search_text = nil
    Editor_state.cursor1 = Editor_state.search_backup.cursor
    Editor_state.screen_top1 = Editor_state.search_backup.screen_top
    Editor_state.search_backup = nil
  • replacement in edit.lua at line 313
    [20.11296][20.11296:11370]()
    Search_term = nil
    Search_text = nil
    Search_backup = nil
    [20.11296]
    [20.11370]
    Editor_state.search_term = nil
    Editor_state.search_text = nil
    Editor_state.search_backup = nil
  • replacement in edit.lua at line 317
    [20.11407][20.11407:11589]()
    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 = nil
    [20.11407]
    [20.11589]
    local 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
    [20.11621][20.11621:11655]()
    Cursor1.pos = Cursor1.pos+1
    [20.11621]
    [20.11655]
    Editor_state.cursor1.pos = Editor_state.cursor1.pos+1
  • replacement in edit.lua at line 329
    [20.11787][20.11787:11962]()
    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)
    [20.11787]
    [20.11962]
    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
    [20.11991][20.11991:12035]()
    initialize_font_settings(Font_height+2)
    [20.11991]
    [20.12035]
    initialize_font_settings(Editor_state.font_height+2)
  • replacement in edit.lua at line 336
    [20.12086][20.12086:12130]()
    initialize_font_settings(Font_height-2)
    [20.12086]
    [20.12130]
    initialize_font_settings(Editor_state.font_height-2)
  • replacement in edit.lua at line 342
    [20.12265][20.12265:12344]()
    for _,line in ipairs(Lines) do line.y = nil end -- just in case we scroll
    [20.12265]
    [20.12344]
    for _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll
  • replacement in edit.lua at line 346
    [20.12424][20.12424:12595]()
    Screen_top1 = deepcopy(src.screen_top)
    Cursor1 = deepcopy(src.cursor)
    Selection1 = deepcopy(src.selection)
    patch(Lines, event.after, event.before)
    [20.12424]
    [20.12595]
    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
    [20.12746][20.12746:12825]()
    for _,line in ipairs(Lines) do line.y = nil end -- just in case we scroll
    [20.12746]
    [20.12825]
    for _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll
  • replacement in edit.lua at line 358
    [20.12904][20.12904:13075]()
    Screen_top1 = deepcopy(src.screen_top)
    Cursor1 = deepcopy(src.cursor)
    Selection1 = deepcopy(src.selection)
    patch(Lines, event.before, event.after)
    [20.12904]
    [20.13075]
    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
    [20.13241][20.13241:13320]()
    for _,line in ipairs(Lines) do line.y = nil end -- just in case we scroll
    [20.13241]
    [20.13320]
    for _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll
  • replacement in edit.lua at line 373
    [20.13432][20.13432:13588]()
    for _,line in ipairs(Lines) do line.y = nil end -- just in case we scroll
    local s = Text.cut_selection(Margin_left, App.screen.width-Margin_right)
    [20.13432]
    [20.13588]
    for _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll
    local s = Text.cut_selection(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)
  • replacement in edit.lua at line 380
    [20.13689][20.13689:13768]()
    for _,line in ipairs(Lines) do line.y = nil end -- just in case we scroll
    [20.13689]
    [20.13768]
    for _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll
  • replacement in edit.lua at line 383
    [20.13904][20.13904:13941]()
    local before_line = Cursor1.line
    [20.13904]
    [20.13941]
    local before_line = Editor_state.cursor1.line
  • replacement in edit.lua at line 395
    [20.14272][20.14272:14360]()
    Text.snap_cursor_to_bottom_of_screen(Margin_left, App.screen.height-Margin_right)
    [20.14272]
    [20.14360]
    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
    [20.14388][20.14388:14470]()
    record_undo_event({before=before, after=snapshot(before_line, Cursor1.line)})
    [20.14388]
    [20.14470]
    record_undo_event({before=before, after=snapshot(before_line, Editor_state.cursor1.line)})
  • replacement in edit.lua at line 410
    [20.14922][20.14922:14957]()
    for _,line in ipairs(Lines) do
    [20.14922]
    [20.14957]
    for _,line in ipairs(Editor_state.lines) do
  • replacement in edit.lua at line 415
    [20.15043][20.15043:15088]()
    elseif Current_drawing_mode == 'name' then
    [20.15043]
    [20.15088]
    elseif Editor_state.current_drawing_mode == 'name' then
  • replacement in edit.lua at line 417
    [20.15118][20.15118:15203]()
    Current_drawing_mode = Previous_drawing_mode
    Previous_drawing_mode = nil
    [20.15118]
    [20.15203]
    Editor_state.current_drawing_mode = Editor_state.previous_drawing_mode
    Editor_state.previous_drawing_mode = nil
  • replacement in edit.lua at line 420
    [20.15212][20.15212:15315]()
    local before = snapshot(Lines.current_drawing_index)
    local drawing = Lines.current_drawing
    [20.15212]
    [20.15315]
    local before = snapshot(Editor_state.lines.current_drawing_index)
    local drawing = Editor_state.lines.current_drawing
  • replacement in edit.lua at line 425
    [20.15429][20.15429:15517]()
    record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)})
    [20.15429]
    [20.15517]
    record_undo_event({before=before, after=snapshot(Editor_state.lines.current_drawing_index)})
  • replacement in edit.lua at line 431
    [20.15745][20.15745:15833]()
    record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)})
    [20.15745]
    [20.15833]
    record_undo_event({before=before, after=snapshot(Editor_state.lines.current_drawing_index)})
  • replacement in edit.lua at line 436
    [20.15878][20.15878:15957]()
    for _,line in ipairs(Lines) do line.y = nil end -- just in case we scroll
    [20.15878]
    [20.15957]
    for _,line in ipairs(Editor_state.lines) do line.y = nil end -- just in case we scroll
  • replacement in drawing_tests.lua at line 8
    [20.186][20.186:228]()
    Filename = 'foo'
    Lines = load_array{}
    [20.186]
    [18.1328]
    Editor_state.filename = 'foo'
    Editor_state.lines = load_array{}
  • replacement in drawing_tests.lua at line 12
    [20.280][20.280:327]()
    App.run_after_mouse_click(8,Margin_top+8, 1)
    [20.280]
    [20.789]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.353]
    [18.1343]
    Editor_state.filename = 'foo'
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 31
    [18.1357][20.554:907](),[20.554][20.554:907]()
    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')
    [18.1357]
    [20.907]
    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
    [20.924][20.924:1088](),[20.1212][20.1212:1239]()
    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]
    [20.924]
    [20.15]
    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
    [20.622][20.622:684]()
    Lines = load_from_disk(Filename)
    local drawing = Lines[1]
    [20.622]
    [20.684]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'manhattan'
    [20.313]
    [18.1358]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'manhattan'
  • replacement in drawing_tests.lua at line 74
    [18.1372][20.519:927](),[20.519][20.519:927]()
    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')
    [18.1372]
    [20.927]
    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
    [20.982][20.982:1146](),[20.1292][20.1292:1319]()
    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]
    [20.982]
    [20.138]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.1916]
    [18.1373]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 101
    [18.1387][20.2117:2480](),[20.2117][20.2117:2480]()
    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')
    [18.1387]
    [20.2480]
    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
    [20.2499][20.2499:2586]()
    App.mouse_move(Margin_left+4, Margin_top+Drawing_padding_top+4) -- hover on drawing
    [20.2499]
    [20.2586]
    App.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
    [20.2618][20.2618:2787](),[20.2915][20.2915:2942]()
    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]
    [20.2618]
    [20.283]
    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
    [20.188][20.188:377]()
    Filename = 'foo'
    App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.188]
    [18.1388]
    Editor_state.filename = 'foo'
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 129
    [18.1402][20.390:763](),[20.390][20.390:763]()
    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')
    [18.1402]
    [20.763]
    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
    [20.789][20.789:869]()
    App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)
    [20.789]
    [20.869]
    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
    [20.916][20.916:1027]()
    App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)
    local drawing = Lines[1]
    [20.916]
    [20.1027]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.3500]
    [18.1403]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 151
    [20.3761][20.3761:3848]()
    App.mouse_move(Margin_left+4, Margin_top+Drawing_padding_top+4) -- hover on drawing
    [20.3761]
    [20.3848]
    App.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
    [20.3909][20.3909:4014]()
    check_eq(Current_drawing_mode, 'line', 'F - test_keys_do_not_affect_shape_when_mouse_up/drawing_mode')
    [20.3909]
    [20.4014]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.4277]
    [18.1418]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 165
    [18.1432][20.4478:4896](),[20.4478][20.4478:4896]()
    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')
    [18.1432]
    [20.4896]
    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
    [20.4915][20.4915:5084]()
    App.mouse_move(Margin_left+4, Margin_top+Drawing_padding_top+4) -- hover on drawing
    App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)
    [20.4915]
    [20.5084]
    App.mouse_move(Editor_state.margin_left+4, Editor_state.margin_top+Editor_state.drawing_padding_top+4) -- hover on drawing
    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 174
    [20.5114][20.5114:5201](),[20.5351][20.5351:5378]()
    App.run_after_mouse_release(Margin_left+35+30, Margin_top+Drawing_padding_top+36, 1)
    local drawing = Lines[1]
    [20.5114]
    [20.410]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'circle'
    [20.5906]
    [18.1433]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'circle'
  • replacement in drawing_tests.lua at line 192
    [18.1447][20.6109:6457](),[20.6109][20.6109:6457]()
    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')
    [18.1447]
    [20.6457]
    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
    [20.6474][20.6474:6627]()
    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)
    [20.6474]
    [20.6627]
    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
    [20.6670][20.6670:6769](),[20.6891][20.6891:6918]()
    App.run_after_mouse_release(Margin_left+35+50, Margin_top+Drawing_padding_top+36+50, 1) -- 45°
    local drawing = Lines[1]
    [20.6670]
    [20.559]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    [20.847]
    [18.1448]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
  • replacement in drawing_tests.lua at line 221
    [18.1462][20.1016:1472](),[20.1016][20.1016:1472]()
    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')
    [18.1462]
    [20.1472]
    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
    [20.1489][20.1489:1569]()
    App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)
    [20.1489]
    [20.1569]
    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
    [20.1634][20.1634:1702]()
    App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+36)
    [20.1634]
    [20.1702]
    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
    [20.1763][20.1763:1874]()
    App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+26, 1)
    local drawing = Lines[1]
    [20.1763]
    [20.1874]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    [20.2783]
    [18.1463]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
  • replacement in drawing_tests.lua at line 258
    [18.1477][20.2952:3420](),[20.2952][20.2952:3420]()
    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')
    [18.1477]
    [20.3420]
    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
    [20.3437][20.3437:3519]()
    App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)
    [20.3437]
    [20.3519]
    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
    [20.3597][20.3597:3665]()
    App.mouse_move(Margin_left+42, Margin_top+Drawing_padding_top+45)
    [20.3597]
    [20.3665]
    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
    [20.3733][20.3733:3801]()
    App.mouse_move(Margin_left+75, Margin_top+Drawing_padding_top+76)
    [20.3733]
    [20.3801]
    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
    [20.3907][20.3907:4018]()
    App.run_after_mouse_release(Margin_left+15, Margin_top+Drawing_padding_top+26, 1)
    local drawing = Lines[1]
    [20.3907]
    [20.4018]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    [20.5167]
    [18.1478]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
  • replacement in drawing_tests.lua at line 301
    [18.1492][20.5336:5882](),[20.5336][20.5336:5882]()
    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')
    [18.1492]
    [20.5882]
    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
    [20.5899][20.5899:5981]()
    App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)
    [20.5899]
    [20.5981]
    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
    [20.6059][20.6059:6127]()
    App.mouse_move(Margin_left+42, Margin_top+Drawing_padding_top+45)
    [20.6059]
    [20.6127]
    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
    [20.6195][20.6195:6263]()
    App.mouse_move(Margin_left+75, Margin_top+Drawing_padding_top+76)
    [20.6195]
    [20.6263]
    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
    [20.6293][20.6293:6320]()
    local drawing = Lines[1]
    [20.6293]
    [20.6320]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    [20.7265]
    [18.1493]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
  • replacement in drawing_tests.lua at line 336
    [18.1507][20.7434:7884](),[20.7434][20.7434:7884]()
    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')
    [18.1507]
    [20.7884]
    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
    [20.7901][20.7901:7983]()
    App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)
    [20.7901]
    [20.7983]
    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
    [20.8058][20.8058:8126]()
    App.mouse_move(Margin_left+42, Margin_top+Drawing_padding_top+45)
    [20.8058]
    [20.8126]
    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
    [20.8194][20.8194:8262]()
    App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+66)
    [20.8194]
    [20.8262]
    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
    [20.8358][20.8358:8469]()
    App.run_after_mouse_release(Margin_left+15, Margin_top+Drawing_padding_top+26, 1)
    local drawing = Lines[1]
    [20.8358]
    [20.8469]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.242]
    [18.1508]
    Editor_state.filename = 'foo'
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 381
    [20.460][20.460:651]()
    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]
    [20.460]
    [20.651]
    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
    [20.1347][20.1347:1418]()
    check_eq(Current_drawing_mode, 'name', 'F - test_name_point/mode:1')
    [20.1347]
    [20.1418]
    check_eq(Editor_state.current_drawing_mode, 'name', 'F - test_name_point/mode:1')
  • replacement in drawing_tests.lua at line 400
    [20.1523][20.1523:1594]()
    check_eq(Current_drawing_mode, 'name', 'F - test_name_point/mode:2')
    [20.1523]
    [20.1594]
    check_eq(Editor_state.current_drawing_mode, 'name', 'F - test_name_point/mode:2')
  • replacement in drawing_tests.lua at line 403
    [20.1651][20.1651:1722]()
    check_eq(Current_drawing_mode, 'line', 'F - test_name_point/mode:3')
    [20.1651]
    [20.1722]
    check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_name_point/mode:3')
  • replacement in drawing_tests.lua at line 409
    [20.55][20.55:141]()
    Lines = load_from_disk(Filename)
    local p2 = Lines[1].points[drawing.shapes[1].p2]
    [20.55]
    [20.141]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.112]
    [18.1523]
    Editor_state.filename = 'foo'
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 422
    [18.1537][20.330:521](),[20.330][20.330:521]()
    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]
    [18.1537]
    [20.521]
    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
    [20.242][20.242:355]()
    Lines = load_from_disk(Filename)
    local drawing = Lines[1]
    local p2 = Lines[1].points[drawing.shapes[1].p2]
    [20.242]
    [20.355]
    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
    [20.1217][20.1217:1288]()
    check_eq(Current_drawing_mode, 'move', 'F - test_move_point/mode:1')
    [20.1217]
    [20.1288]
    check_eq(Editor_state.current_drawing_mode, 'move', 'F - test_move_point/mode:1')
  • replacement in drawing_tests.lua at line 451
    [20.1471][20.1471:1539]()
    App.mouse_move(Margin_left+26, Margin_top+Drawing_padding_top+44)
    [20.1471]
    [20.1539]
    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
    [20.1722][20.1722:1875]()
    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')
    [20.1722]
    [20.1875]
    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
    [20.492][20.492:578]()
    Lines = load_from_disk(Filename)
    local p2 = Lines[1].points[drawing.shapes[1].p2]
    [20.492]
    [20.578]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'manhattan'
    [20.154]
    [18.1553]
    Editor_state.filename = 'foo'
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'manhattan'
  • replacement in drawing_tests.lua at line 478
    [18.1567][20.379:570](),[20.379][20.379:570]()
    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]
    [18.1567]
    [20.570]
    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
    [20.922][20.922:1011]()
    check_eq(Current_drawing_mode, 'move', 'F - test_move_point_on_manhattan_line/mode:1')
    [20.922]
    [20.1011]
    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
    [20.1027][20.1027:1095]()
    App.mouse_move(Margin_left+26, Margin_top+Drawing_padding_top+44)
    [20.1027]
    [20.1095]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.158]
    [18.1583]
    Editor_state.filename = 'foo'
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 503
    [18.1597][20.359:716](),[20.359][20.359:716]()
    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]
    [18.1597]
    [20.716]
    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
    [20.1028][20.1028:1096]()
    App.mouse_move(Margin_left+35, Margin_top+Drawing_padding_top+36)
    [20.1028]
    [20.1096]
    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
    [20.754][20.754:860]()
    Lines = load_from_disk(Filename)
    check_eq(#Lines[1].shapes, 0, 'F - test_delete_lines_at_point/save')
    [20.754]
    [20.1304]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.1468]
    [18.1598]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 531
    [18.1612][20.1669:2026](),[20.1669][20.1669:2026]()
    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]
    [18.1612]
    [20.2026]
    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
    [20.2368][20.2368:2436]()
    App.mouse_move(Margin_left+25, Margin_top+Drawing_padding_top+26)
    [20.2368]
    [20.2436]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.2844]
    [18.1613]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 555
    [20.3062][20.3062:3142]()
    App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)
    [20.3062]
    [20.3142]
    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
    [20.3207][20.3207:3275]()
    App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+36)
    [20.3207]
    [20.3275]
    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
    [20.3336][20.3336:3404]()
    App.mouse_move(Margin_left+35, Margin_top+Drawing_padding_top+26)
    [20.3336]
    [20.3404]
    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
    [20.3466][20.3466:3577]()
    App.run_after_mouse_release(Margin_left+14, Margin_top+Drawing_padding_top+16, 1)
    local drawing = Lines[1]
    [20.3466]
    [20.3577]
    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
    [20.3893][20.3893:3961]()
    App.mouse_move(Margin_left+35, Margin_top+Drawing_padding_top+26)
    [20.3893]
    [20.3961]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.4357]
    [18.1628]
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 585
    [20.4575][20.4575:4655]()
    App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)
    [20.4575]
    [20.4655]
    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
    [20.4720][20.4720:4788]()
    App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+36)
    [20.4720]
    [20.4788]
    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
    [20.4849][20.4849:4960]()
    App.run_after_mouse_release(Margin_left+14, Margin_top+Drawing_padding_top+16, 1)
    local drawing = Lines[1]
    [20.4849]
    [20.4960]
    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
    [20.5276][20.5276:5344]()
    App.mouse_move(Margin_left+65, Margin_top+Drawing_padding_top+36)
    [20.5276]
    [20.5344]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.192]
    [18.1643]
    Editor_state.filename = 'foo'
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 612
    [20.429][20.429:620]()
    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]
    [20.429]
    [20.620]
    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
    [20.1276][20.1276:1347]()
    check_eq(#History, 1, 'F - test_undo_name_point/baseline/history:1')
    [20.1276]
    [20.1347]
    check_eq(#Editor_state.history, 1, 'F - test_undo_name_point/baseline/history:1')
  • replacement in drawing_tests.lua at line 631
    [20.1555][20.1555:1704]()
    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')
    [20.1555]
    [20.1704]
    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
    [20.1746][20.1746:1773]()
    local drawing = Lines[1]
    [20.1746]
    [20.1773]
    local drawing = Editor_state.lines[1]
  • replacement in drawing_tests.lua at line 637
    [20.1823][20.1823:1892]()
    check_eq(Next_history, 3, 'F - test_undo_name_point/next_history')
    [20.1823]
    [20.1892]
    check_eq(Editor_state.next_history, 3, 'F - test_undo_name_point/next_history')
  • replacement in drawing_tests.lua at line 643
    [20.33][20.2016:2102](),[20.2016][20.2016:2102]()
    Lines = load_from_disk(Filename)
    local p2 = Lines[1].points[drawing.shapes[1].p2]
    [20.33]
    [20.2102]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.118]
    [18.1658]
    Editor_state.filename = 'foo'
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 656
    [18.1672][20.338:529](),[20.338][20.338:529]()
    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]
    [18.1672]
    [20.529]
    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
    [20.1230][20.1230:1298]()
    App.mouse_move(Margin_left+26, Margin_top+Drawing_padding_top+44)
    [20.1230]
    [20.1298]
    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
    [20.1491][20.1491:1642]()
    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')
    [20.1491]
    [20.1642]
    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
    [20.1744][20.1744:1771]()
    local drawing = Lines[1]
    [20.1744]
    [20.1771]
    local drawing = Editor_state.lines[1]
  • replacement in drawing_tests.lua at line 684
    [20.1821][20.1821:1890]()
    check_eq(Next_history, 2, 'F - test_undo_move_point/next_history')
    [20.1821]
    [20.1890]
    check_eq(Editor_state.next_history, 2, 'F - test_undo_move_point/next_history')
  • replacement in drawing_tests.lua at line 691
    [20.53][20.2013:2099](),[20.2013][20.2013:2099]()
    Lines = load_from_disk(Filename)
    local p2 = Lines[1].points[drawing.shapes[1].p2]
    [20.53]
    [20.2099]
    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 pixels
    Lines = load_array{'```lines', '```', ''}
    Current_drawing_mode = 'line'
    [20.190]
    [18.1673]
    Editor_state.filename = 'foo'
    App.screen.init{width=Editor_state.margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    Editor_state.lines = load_array{'```lines', '```', ''}
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing_tests.lua at line 705
    [18.1687][20.410:767](),[20.410][20.410:767]()
    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]
    [18.1687]
    [20.767]
    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
    [20.1067][20.1067:1135]()
    App.mouse_move(Margin_left+35, Margin_top+Drawing_padding_top+36)
    [20.1067]
    [20.1135]
    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
    [20.1377][20.1377:1404]()
    local drawing = Lines[1]
    [20.1377]
    [20.1404]
    local drawing = Editor_state.lines[1]
  • replacement in drawing_tests.lua at line 722
    [20.1454][20.1454:1523]()
    check_eq(Next_history, 3, 'F - test_undo_move_point/next_history')
    [20.1454]
    [20.1523]
    check_eq(Editor_state.next_history, 3, 'F - test_undo_move_point/next_history')
  • replacement in drawing_tests.lua at line 729
    [20.1704][20.1704:1806]()
    Lines = load_from_disk(Filename)
    check_eq(#Lines[1].shapes, 2, 'F - test_undo_delete_point/save')
    [20.1704]
    [20.2211]
    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
    [20.1580][20.6571:6674]()
    if pmx < App.screen.width-Margin_right and pmy > line.y and pmy < line.y+Drawing.pixels(line.h) then
    [20.1580]
    [17.1026]
    if 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] then
    icon[Current_drawing_mode](App.screen.width-Margin_right-22, line.y+4)
    [17.1052]
    [20.523]
    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] then
    icon[Editor_state.current_drawing_mode](App.screen.width-Editor_state.margin_right-22, line.y+4)
  • replacement in drawing.lua at line 15
    [20.532][20.6864:6942]()
    icon[Previous_drawing_mode](App.screen.width-Margin_right-22, line.y+4)
    [20.532]
    [20.589]
    icon[Editor_state.previous_drawing_mode](App.screen.width-Editor_state.margin_right-22, line.y+4)
  • replacement in drawing.lua at line 29
    [20.853][20.3000:3074](),[20.817][20.3000:3074]()
    local mx,my = Drawing.coord(pmx-Margin_left), Drawing.coord(pmy-line.y)
    [20.817]
    [20.894]
    local mx,my = Drawing.coord(pmx-Editor_state.margin_left), Drawing.coord(pmy-line.y)
  • replacement in drawing.lua at line 38
    [20.1083][20.3075:3131]()
    Drawing.draw_shape(Margin_left,line.y, line, shape)
    [20.1083]
    [20.1122]
    Drawing.draw_shape(Editor_state.margin_left,line.y, line, shape)
  • replacement in drawing.lua at line 44
    [17.1159][20.3132:3232](),[20.1260][20.3132:3232]()
    love.graphics.circle('line', Drawing.pixels(p.x)+Margin_left,Drawing.pixels(p.y)+line.y, 4)
    [17.1159]
    [20.1335]
    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
    [17.1192][20.3233:3333](),[20.1384][20.3233:3333]()
    love.graphics.circle('fill', Drawing.pixels(p.x)+Margin_left,Drawing.pixels(p.y)+line.y, 2)
    [17.1192]
    [20.1521]
    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
    [4.37][20.3334:3418](),[20.1574][20.3334:3418]()
    local x,y = Drawing.pixels(p.x)+Margin_left+5, Drawing.pixels(p.y)+line.y+5
    [4.37]
    [20.8431]
    local 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
    [20.8472][20.172:254](),[20.172][20.172:254]()
    if Current_drawing_mode == 'name' and i == line.pending.target_point then
    [20.8472]
    [20.254]
    if Editor_state.current_drawing_mode == 'name' and i == line.pending.target_point then
  • replacement in drawing.lua at line 59
    [20.404][20.576:603]()
    name_text = Em
    [20.404]
    [20.488]
    name_text = Editor_state.em
  • replacement in drawing.lua at line 63
    [20.596][20.8473:8555]()
    love.graphics.rectangle('fill', x,y, App.width(name_text), Line_height)
    [20.596]
    [20.703]
    love.graphics.rectangle('fill', x,y, App.width(name_text), Editor_state.line_height)
  • replacement in drawing.lua at line 69
    [17.1279][20.3419:3474](),[20.51][20.3419:3474]()
    Drawing.draw_pending_shape(Margin_left,line.y, line)
    [17.1279]
    [20.10]
    Drawing.draw_pending_shape(Editor_state.margin_left,line.y, line)
  • replacement in drawing.lua at line 207
    [20.2271][20.6943:7072]()
    return y >= drawing.y and y < drawing.y + Drawing.pixels(drawing.h) and x >= Margin_left and x < App.screen.width-Margin_right
    [20.2271]
    [20.795]
    return 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' then
    drawing.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' then
    local 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' then
    local 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' then
    local 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' then
    [20.853]
    [20.11]
    if Editor_state.current_drawing_mode == 'freehand' then
    drawing.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' then
    local 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' then
    local 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' then
    local 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
    [20.54][20.54:99]()
    elseif Current_drawing_mode == 'name' then
    [20.54]
    [20.11]
    elseif Editor_state.current_drawing_mode == 'name' then
  • replacement in drawing.lua at line 227
    [20.4193][20.4193:4225]()
    print(Current_drawing_mode)
    [20.4193]
    [20.4225]
    print(Editor_state.current_drawing_mode)
  • replacement in drawing.lua at line 234
    [20.144][20.135:225]()
    if Lines.current_drawing == nil then return end
    local drawing = Lines.current_drawing
    [20.144]
    [20.218]
    if Editor_state.lines.current_drawing == nil then return end
    local drawing = Editor_state.lines.current_drawing
  • replacement in drawing.lua at line 241
    [20.433][20.3929:4062]()
    table.insert(drawing.pending.points, {x=Drawing.coord(App.mouse_x()-Margin_left), y=Drawing.coord(App.mouse_y()-drawing.y)})
    [20.433]
    [20.565]
    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
    [20.614][20.4063:4142]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.614]
    [20.684]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 249
    [20.790][20.790:835]()
    elseif Current_drawing_mode == 'move' then
    [20.790]
    [20.835]
    elseif Editor_state.current_drawing_mode == 'move' then
  • replacement in drawing.lua at line 251
    [20.881][20.4143:4220]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.881]
    [20.949]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 280
    [20.99][20.99:221](),[20.221][20.1940:2049]()
    if Current_drawing_mode == 'move' then
    Current_drawing_mode = Previous_drawing_mode
    Previous_drawing_mode = nil
    if Lines.current_drawing then
    Lines.current_drawing.pending = {}
    Lines.current_drawing = nil
    [20.99]
    [20.2049]
    if Editor_state.current_drawing_mode == 'move' then
    Editor_state.current_drawing_mode = Editor_state.previous_drawing_mode
    Editor_state.previous_drawing_mode = nil
    if Editor_state.lines.current_drawing then
    Editor_state.lines.current_drawing.pending = {}
    Editor_state.lines.current_drawing = nil
  • replacement in drawing.lua at line 287
    [20.2057][20.226:304](),[20.221][20.226:304]()
    elseif Lines.current_drawing then
    local drawing = Lines.current_drawing
    [20.2057]
    [20.46]
    elseif Editor_state.lines.current_drawing then
    local drawing = Editor_state.lines.current_drawing
  • replacement in drawing.lua at line 297
    [20.227][20.4221:4300]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.227]
    [20.297]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 304
    [20.627][20.4301:4380]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.627]
    [20.697]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 312
    [20.1032][20.4381:4472]()
    App.mouse_move(Margin_left+Drawing.pixels(p2.x), drawing.y+Drawing.pixels(p2.y))
    [20.1032]
    [20.1122]
    App.mouse_move(Editor_state.margin_left+Drawing.pixels(p2.x), drawing.y+Drawing.pixels(p2.y))
  • replacement in drawing.lua at line 316
    [20.1231][20.4473:4552]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.1231]
    [20.1301]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 324
    [20.1668][20.4553:4634]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.1668]
    [20.1740]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 339
    [20.2366][20.4635:4716]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.2366]
    [20.2438]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 350
    [20.2970][20.4717:4796]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.2970]
    [20.3040]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 357
    [20.3348][20.4797:4876]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.3348]
    [20.3418]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 369
    [20.3054][20.305:380]()
    Lines.current_drawing.pending = {}
    Lines.current_drawing = nil
    [20.3054]
    [20.3113]
    Editor_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'
    [20.1665]
    [5.15]
    Editor_state.current_drawing_mode = 'freehand'
  • replacement in drawing.lua at line 379
    [5.64][5.64:98]()
    Current_drawing_mode = 'line'
    [5.64]
    [5.98]
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing.lua at line 390
    [5.724][5.724:758]()
    Current_drawing_mode = 'line'
    [5.724]
    [5.758]
    Editor_state.current_drawing_mode = 'line'
  • replacement in drawing.lua at line 392
    [5.807][5.807:846]()
    Current_drawing_mode = 'manhattan'
    [5.807]
    [5.846]
    Editor_state.current_drawing_mode = 'manhattan'
  • replacement in drawing.lua at line 405
    [5.1550][5.1550:1589]()
    Current_drawing_mode = 'manhattan'
    [5.1550]
    [20.1666]
    Editor_state.current_drawing_mode = 'manhattan'
  • replacement in drawing.lua at line 407
    [20.1721][20.5918:5955](),[20.2683][20.5918:5955](),[20.5918][20.5918:5955]()
    Current_drawing_mode = 'polygon'
    [20.1721]
    [20.1722]
    Editor_state.current_drawing_mode = 'polygon'
  • replacement in drawing.lua at line 409
    [20.1771][20.6009:6046](),[20.2735][20.6009:6046](),[20.6009][20.6009:6046]()
    Current_drawing_mode = 'polygon'
    [20.1771]
    [20.16]
    Editor_state.current_drawing_mode = 'polygon'
  • replacement in drawing.lua at line 424
    [20.1827][20.6467:6506](),[20.2793][20.6467:6506](),[20.6467][20.6467:6506]()
    Current_drawing_mode = 'rectangle'
    [20.1827]
    [20.1828]
    Editor_state.current_drawing_mode = 'rectangle'
  • replacement in drawing.lua at line 426
    [20.1877][20.6560:6599](),[20.2845][20.6560:6599](),[20.6560][20.6560:6599]()
    Current_drawing_mode = 'rectangle'
    [20.1877]
    [20.65]
    Editor_state.current_drawing_mode = 'rectangle'
  • replacement in drawing.lua at line 441
    [20.1933][20.7267:7303](),[20.2903][20.7267:7303](),[20.7267][20.7267:7303]()
    Current_drawing_mode = 'square'
    [20.1933]
    [20.1934]
    Editor_state.current_drawing_mode = 'square'
  • replacement in drawing.lua at line 443
    [20.1983][20.7357:7393](),[20.2955][20.7357:7393](),[20.7357][20.7357:7393]()
    Current_drawing_mode = 'square'
    [20.1983]
    [20.114]
    Editor_state.current_drawing_mode = 'square'
  • replacement in drawing.lua at line 461
    [20.7998][20.9421:9508]()
    elseif App.mouse_down(1) and chord == 'p' and Current_drawing_mode == 'polygon' then
    [20.7998]
    [20.9508]
    elseif App.mouse_down(1) and chord == 'p' and Editor_state.current_drawing_mode == 'polygon' then
  • replacement in drawing.lua at line 463
    [20.9556][20.9556:9655]()
    local mx,my = Drawing.coord(App.mouse_x()-Margin_left), Drawing.coord(App.mouse_y()-drawing.y)
    [20.9556]
    [20.9655]
    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
    [20.9759][20.9759:9886]()
    elseif App.mouse_down(1) and chord == 'p' and (Current_drawing_mode == 'rectangle' or Current_drawing_mode == 'square') then
    [20.9759]
    [20.163]
    elseif 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
    [20.211][20.4877:4976]()
    local mx,my = Drawing.coord(App.mouse_x()-Margin_left), Drawing.coord(App.mouse_y()-drawing.y)
    [20.211]
    [20.6888]
    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' then
    [20.2204]
    [20.212]
    Editor_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
    [20.7258][20.4977:5076]()
    local mx,my = Drawing.coord(App.mouse_x()-Margin_left), Drawing.coord(App.mouse_y()-drawing.y)
    [20.7258]
    [20.7414]
    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'
    [20.2341]
    [20.261]
    Editor_state.current_drawing_mode = 'circle'
  • replacement in drawing.lua at line 497
    [20.10172][20.11:107]()
    if Previous_drawing_mode == nil then
    Previous_drawing_mode = Current_drawing_mode
    [20.10172]
    [20.107]
    if Editor_state.previous_drawing_mode == nil then
    Editor_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_index
    Lines.current_drawing = drawing
    [20.117]
    [20.10357]
    Editor_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_index
    Editor_state.lines.current_drawing = drawing
  • replacement in drawing.lua at line 508
    [20.1972][20.225:268]()
    if Previous_drawing_mode == nil then
    [20.1972]
    [20.268]
    if Editor_state.previous_drawing_mode == nil then
  • replacement in drawing.lua at line 510
    [20.293][20.293:346]()
    Previous_drawing_mode = Current_drawing_mode
    [20.293]
    [20.346]
    Editor_state.previous_drawing_mode = Editor_state.current_drawing_mode
  • replacement in drawing.lua at line 512
    [20.356][20.2023:2059](),[20.2023][20.2023:2059]()
    Current_drawing_mode = 'name'
    [20.356]
    [20.2059]
    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_index
    Lines.current_drawing = drawing
    [20.2077]
    [20.10680]
    drawing.pending = {mode=Editor_state.current_drawing_mode, target_point=point_index}
    Editor_state.lines.current_drawing_index = drawing_index
    Editor_state.lines.current_drawing = drawing
  • replacement in drawing.lua at line 602
    [20.4110][20.605:653](),[20.19164][20.605:653]()
    for drawing_index,drawing in ipairs(Lines) do
    [20.4110]
    [20.19200]
    for drawing_index,drawing in ipairs(Editor_state.lines) do
  • replacement in drawing.lua at line 613
    [20.19456][20.19456:19492]()
    for _,drawing in ipairs(Lines) do
    [20.19456]
    [20.19492]
    for _,drawing in ipairs(Editor_state.lines) do
  • replacement in drawing.lua at line 617
    [20.749][20.5077:5156]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.749]
    [20.19800]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 630
    [20.20059][20.692:740]()
    for drawing_index,drawing in ipairs(Lines) do
    [20.20059]
    [20.20095]
    for drawing_index,drawing in ipairs(Editor_state.lines) do
  • replacement in drawing.lua at line 634
    [20.867][20.5157:5236]()
    local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
    [20.867]
    [20.20403]
    local mx,my = Drawing.coord(x-Editor_state.margin_left), Drawing.coord(y-drawing.y)
  • replacement in drawing.lua at line 647
    [20.20654][20.20654:20690]()
    for _,drawing in ipairs(Lines) do
    [20.20654]
    [20.20690]
    for _,drawing in ipairs(Editor_state.lines) do
  • replacement in drawing.lua at line 703
    [20.23060][20.5237:5294]()
    return (cx-px)*(cx-px) + (cy-py)*(cy-py) < Margin_left
    [20.23060]
    [20.23108]
    return (cx-px)*(cx-px) + (cy-py)*(cy-py) < Editor_state.margin_left
  • replacement in drawing.lua at line 707
    [20.27500][20.7073:7132]()
    return math.floor(n*(App.screen.width-Margin_width)/256)
    [20.27500]
    [20.27529]
    return math.floor(n*(App.screen.width-Editor_state.margin_width)/256)
  • replacement in drawing.lua at line 710
    [20.27579][20.7133:7192]()
    return math.floor(n*256/(App.screen.width-Margin_width))
    [20.27579]
    [20.11944]
    return math.floor(n*256/(App.screen.width-Editor_state.margin_width))