switch to line index in a function

[?]
Jul 17, 2022, 4:05 PM
52ZZ5TIEK5Z6VVXO7R3EFV5JTIWDA4IDD3YISXHHTHQMOAKVYJJQC

Dependencies

  • [2] MXA3RZYK deduce left/right from state where possible
  • [3] PK5U572C drop some extra args
  • [4] 242L3OQX bugfix: ensure Cursor_line is always on a text line
  • [5] R22PA3XR fix a second BSOD in #4 :/
  • [6] LF7BWEG4 group all editor globals
  • [7] S2MISTTM add state arg to a few functions
  • [8] QCPXQ2E3 add state arg to a few functions
  • [9] LNUHQOGH start passing in Editor_state explicitly
  • [10] OGUV4HSA remove some memory leaks from rendered fragments
  • [11] CTJ3IZGS add args to some functions
  • [12] CCYSVZA2 bugfix: BSOD in #4.
  • [13] MYC7XR5Q bugfix: lines that aren't drawn from the start
  • [14] 3OKKTUT4 up and down arrow now moving by screen line where possible
  • [15] EMRPLZPW drop an arg from a function
  • [16] UHB4GARJ left/right margin -> left/right coordinates
  • [17] LXTTOB33 extract a couple of files
  • [18] 2L5MEZV3 experiment: new edit namespace
  • [19] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [*] BULPIBEG beginnings of a module for the text editor

Change contents

  • replacement in text.lua at line 696
    [4.936][2.2884:2924]()
    function Text.in_line(State, line, x,y)
    [4.936]
    [4.1014]
    function Text.in_line(State, line_index, x,y)
    local line = State.lines[line_index]
  • replacement in select.lua at line 96
    [4.46375][2.4182:4227]()
    if Text.in_line(State, line, x,y) then
    [4.46375]
    [2.4227]
    if Text.in_line(State, line_index, x,y) then
  • replacement in edit.lua at line 203
    [4.7091][3.15:60]()
    if Text.in_line(State, line, x,y) then
    [4.7091]
    [4.7173]
    if Text.in_line(State, line_index, x,y) then
  • replacement in edit.lua at line 248
    [4.8882][3.118:165]()
    if Text.in_line(State, line, x,y) then
    [4.8882]
    [4.8966]
    if Text.in_line(State, line_index, x,y) then