bugfix for non-ASCII

[?]
May 29, 2022, 2:57 PM
SLLR6KKIAAJJPODFJLHXNG7Z22C3QUBGEIESWOFOGQVHYJJQ6VSQC

Dependencies

  • [2] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [3] WY3JD6W6 bugfix
  • [4] XNFTJHC4 split keyboard handling between Text and Drawing
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] 2ZYV7D3W handle tab characters

Change contents

  • edit in text.lua at line 885
    [7.99]
    [3.171]
    if Selection1.line then Text.delete_selection() end
  • replacement in text.lua at line 888
    [2.485][2.485:556]()
    byte_offset = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos-1)
    [2.485]
    [3.285]
    byte_offset = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)
  • replacement in text.lua at line 890
    [3.292][3.292:312]()
    byte_offset = 0
    [3.292]
    [3.312]
    byte_offset = 1
  • replacement in text.lua at line 892
    [3.318][2.557:695]()
    Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_offset)..t..string.sub(Lines[Cursor1.line].data, byte_offset+1)
    [3.318]
    [2.695]
    Lines[Cursor1.line].data = string.sub(Lines[Cursor1.line].data, 1, byte_offset-1)..t..string.sub(Lines[Cursor1.line].data, byte_offset)