switch to line index in a function

[?]
Jul 17, 2022, 4:19 PM
FKNXK2OAH4U2V2TXCHWE4C3Z5DROBIIPSXUWFKP7Q3DSNOKFFL5AC

Dependencies

  • [2] 52ZZ5TIE switch to line index in a function
  • [3] LF7BWEG4 group all editor globals
  • [4] YJJ4X4JG bugfix: avoid scrolling on 'end'
  • [5] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [6] QLTJG7Q3 indent
  • [7] LXTTOB33 extract a couple of files
  • [8] QCPXQ2E3 add state arg to a few functions
  • [9] WLJCIXYM add state arg to a few functions
  • [10] 2L5MEZV3 experiment: new edit namespace
  • [11] U52E2XZN fix a crash
  • [12] LNUHQOGH start passing in Editor_state explicitly
  • [13] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [14] K4OBZSHE add args to some functions
  • [15] UHB4GARJ left/right margin -> left/right coordinates
  • [16] PK5U572C drop some extra args
  • [17] MXA3RZYK deduce left/right from state where possible
  • [18] 5FW7YOFT highlight selection while dragging
  • [19] WOXIYUTL bugfix: manage screen_top and cursor when resizing
  • [*] BULPIBEG beginnings of a module for the text editor

Change contents

  • replacement in text.lua at line 706
    [3.1150][3.3041:3091]()
    function Text.to_pos_on_line(State, line, mx, my)
    [3.1150]
    [3.3]
    function Text.to_pos_on_line(State, line_index, mx, my)
    local line = State.lines[line_index]
  • edit in text.lua at line 968
    [3.981][3.5652:5710]()
    local line = State.lines[State.screen_bottom1.line]
  • replacement in text.lua at line 970
    [3.5776][3.3784:3873]()
    pos=Text.to_pos_on_line(State, line, App.screen.width-5, App.screen.height-5),
    [3.5776]
    [3.139]
    pos=Text.to_pos_on_line(State, State.screen_bottom1.line, App.screen.width-5, App.screen.height-5),
  • replacement in select.lua at line 97
    [2.142][3.4227:4292](),[3.4227][3.4227:4292]()
    return line_index, Text.to_pos_on_line(State, line, x,y)
    [2.142]
    [3.46471]
    return line_index, Text.to_pos_on_line(State, line_index, x,y)
  • replacement in edit.lua at line 218
    [3.7859][3.61:117]()
    pos=Text.to_pos_on_line(State, line, x, y),
    [3.7859]
    [3.7952]
    pos=Text.to_pos_on_line(State, line_index, x, y),
  • replacement in edit.lua at line 252
    [3.9058][3.166:224]()
    pos=Text.to_pos_on_line(State, line, x, y),
    [3.9058]
    [3.9153]
    pos=Text.to_pos_on_line(State, line_index, x, y),