stop recomputing Cursor_x now that we're saving it

[?]
May 21, 2022, 3:32 AM
HBZ2UCUFM6EYLFZGUQVJDCLANO4UXYMBOU3TFPB2JASJMB53ZGXAC

Dependencies

  • [2] C42QQZSF another piece of support for line wrapping in cursor up
  • [3] 76AIXR7H bugfix
  • [4] MGT5FTJ3 first stab at supporting wrapping in cursor up
  • [5] 5ED3YGHW planning out cursor up/down over wrapped lines
  • [6] 3CSIZJ33 clearer comments
  • [7] XNFTJHC4 split keyboard handling between Text and Drawing
  • [8] SVJZZDC3 snapshot - no, that's all wrong
  • [*] BULPIBEG beginnings of a module for the text editor

Change contents

  • edit in text.lua at line 239
    [3.358][3.358:437]()
    local old_x = Text.cursor_x(Lines[new_cursor_line].data, Cursor_pos)
  • replacement in text.lua at line 241
    [2.70][2.70:151]()
    Cursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, old_x)
    [2.70]
    [2.151]
    Cursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, Cursor_x)
  • replacement in text.lua at line 253
    [2.507][2.507:595]()
    Cursor_pos = screen_line_starting_pos + Text.nearest_cursor_pos(s, old_x) - 1
    [2.507]
    [3.556]
    Cursor_pos = screen_line_starting_pos + Text.nearest_cursor_pos(s, Cursor_x) - 1
  • edit in text.lua at line 281
    [3.4681][3.4681:4758]()
    local old_x = Text.cursor_x(Lines[new_cursor_line].data, Cursor_pos)
  • replacement in text.lua at line 282
    [3.4796][3.79:156]()
    Cursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, old_x)
    [3.4796]
    [3.4885]
    Cursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, Cursor_x)