drop some redundant args from Text.draw

[?]
Jul 17, 2022, 2:58 PM
3ZSUBI574IYW3BKS6OFPDD6UY2IJBNOQIGA4YFGQSF4VZ3PPATYQC

Dependencies

  • [2] MXA3RZYK deduce left/right from state where possible
  • [3] 4VKEE43Z bugfix
  • [4] GK47BBCY start passing left/right margins everywhere
  • [5] LF7BWEG4 group all editor globals
  • [6] LNUHQOGH start passing in Editor_state explicitly
  • [7] CVGE3SIG I feel confident now that page-down is working.
  • [8] 3TFEAQSW start using some globals
  • [9] UHB4GARJ left/right margin -> left/right coordinates
  • [10] 2L5MEZV3 experiment: new edit namespace
  • [11] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [12] M6TH7VSZ rip out notion of Line_width
  • [13] X3F7ECSL add state arg to some functions
  • [14] CNCYMM6A make test initializations a little more obvious
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] 4KC7I3E2 make colors easier to edit

Change contents

  • replacement in text.lua at line 12
    [3.103][2.3:52]()
    function Text.draw(State, line, line_index, top)
    [3.103]
    [3.1129]
    function Text.draw(State, line_index)
  • edit in text.lua at line 15
    [17.27]
    [3.1747]
    local line = State.lines[line_index]
  • replacement in text.lua at line 18
    [2.76][3.76:92](),[3.76][3.76:92]()
    local y = top
    [2.76]
    [3.1802]
    local y = line.starty
  • edit in edit.lua at line 41
    [3.94459][3.94459:94636]()
    -- 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
  • edit in edit.lua at line 42
    [3.94715]
    [3.94715]
    -- 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
  • replacement in edit.lua at line 166
    [3.5677][2.4585:4669]()
    y, State.screen_bottom1.pos = Text.draw(State, line, line_index, line.starty)
    [3.5677]
    [3.3957]
    y, State.screen_bottom1.pos = Text.draw(State, line_index)