start using some globals

[?]
May 20, 2022, 1:09 PM
3TFEAQSWVFGSH3ISZ4Q3DFR3YPPWHEIBUEVR3XWB7QX6VKHW455QC

Dependencies

  • [2] LUNH47XX make text and drawings the same width
  • [3] EWMPYCDO bugfix
  • [4] BULPIBEG beginnings of a module for the text editor
  • [5] 5DOC2CBM extract a function
  • [6] UWNHC4AA redo y computations
  • [7] 4C375P53 this is a bit clearer
  • [8] XNFTJHC4 split keyboard handling between Text and Drawing
  • [9] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [10] DAENUOGV eliminate assumptions that line length == size in bytes
  • [11] Y36LOGR5 bugfix: show cursor when past end of line
  • [12] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [13] B3IWYWSR delete another arg that can be deduced
  • [*] OTIBCAUJ love2d scaffold

Change contents

  • replacement in text.lua at line 6
    [4.1568][4.1568:1642]()
    function Text.draw(line, line_width, line_index, cursor_line, cursor_pos)
    [4.1568]
    [4.109]
    function Text.draw(line, line_width, line_index)
  • replacement in text.lua at line 33
    [4.2324][4.2324:2426](),[4.2426][4.1:71]()
    if line_index == cursor_line then
    if pos <= cursor_pos and pos + frag_len > cursor_pos then
    Text.draw_cursor(x+Text.cursor_x2(frag, cursor_pos-pos+1), y)
    [4.2324]
    [4.2594]
    if line_index == Cursor_line then
    if pos <= Cursor_pos and pos + frag_len > Cursor_pos then
    Text.draw_cursor(x+Text.cursor_x2(frag, Cursor_pos-pos+1), y)
  • replacement in text.lua at line 41
    [4.37][3.1:59]()
    if line_index == cursor_line and cursor_pos == pos then
    [4.37]
    [4.72]
    if line_index == Cursor_line and Cursor_pos == pos then
  • replacement in main.lua at line 133
    [4.595][2.136:213]()
    y = Text.draw(line, Line_width, line_index, Cursor_line, Cursor_pos)
    [4.213]
    [4.56]
    y = Text.draw(line, Line_width, line_index)