establish a fairly fundamental invariant

akkartik
Nov 25, 2023, 3:21 AM
IPMYE6WTLGB3AWB7VHGSLBLW6PGDX7AEGKFY3KUTXOCQTFQPU6XAC

Dependencies

  • [2] TGHAJBES use line cache for drawings as well
  • [3] KKMFQDR4 editing source code from within the app
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] KZ5GAYRP this fixes the immediate regression

Change contents

  • edit in text.lua at line 976
    [6.732]
    [2.1613]
    -- Perform some early sanity checking here, in hopes that we correctly call
    -- this whenever we change editor state.
    if State.right <= State.left then
    assert(false, ('Right margin %d must be to the right of the left margin %d'):format(State.right, State.left))
    end
  • edit in source_text.lua at line 1038
    [3.146521]
    [3.146521]
    -- Perform some early sanity checking here, in hopes that we correctly call
    -- this whenever we change editor state.
    if State.right <= State.left then
    assert(false, ('Right margin %d must be to the right of the left margin %d'):format(State.right, State.left))
    end