streamline the interface for Text.draw

[?]
Apr 3, 2023, 12:19 AM
4GYPLUDYEF4NPB3HUGSOXAMCZ3UEV5ODM35IRA4DYL5IPDVDHD3QC

Dependencies

  • [2] I64IPGJX avoid saving fragments in lines
  • [3] WJBZZQE4 fold together two largely similar cases
  • [4] Z4XRNDTR find text
  • [5] KURLAXXI clean up some prints
  • [6] B3IWYWSR delete another arg that can be deduced
  • [7] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [8] Y36LOGR5 bugfix: show cursor when past end of line
  • [9] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [10] BULPIBEG beginnings of a module for the text editor
  • [11] LNUHQOGH start passing in Editor_state explicitly
  • [12] XNFTJHC4 split keyboard handling between Text and Drawing
  • [13] 2L5MEZV3 experiment: new edit namespace
  • [14] CVGE3SIG I feel confident now that page-down is working.
  • [15] BW2IUB3K keep all text cache writes inside text.lua
  • [16] 73OCE2MC after much struggle, a brute-force undo
  • [17] EWMPYCDO bugfix
  • [18] 3TFEAQSW start using some globals
  • [19] LF7BWEG4 group all editor globals
  • [20] 4VKEE43Z bugfix
  • [21] 3ZSUBI57 drop some redundant args from Text.draw
  • [22] X3F7ECSL add state arg to some functions

Change contents

  • replacement in text.lua at line 5
    [3.91][3.91:163]()
    -- return the final y, and position of start of final screen line drawn
    [3.91]
    [3.163]
    -- return y for the next line, and position of start of final screen line drawn
  • replacement in text.lua at line 53
    [3.37][2.1143:1206]()
    return y - State.line_height, final_screen_line_starting_pos
    [3.37]
    [2.1206]
    return y, final_screen_line_starting_pos
  • edit in edit.lua at line 186
    [3.419][3.3585:3617](),[3.1038][3.3585:3617](),[3.3585][3.3585:3617]()
    y = y + State.line_height