diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-03-17 21:18:17 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-03-17 21:40:51 -0700 |
commit | ae429cd78a1f52272d5f51991ebb9b04b542ce01 (patch) | |
tree | cfc3a8509ac7b47341507da2c614f0588601fccc /edit.lua | |
parent | 81ebc6a55998f59c34a725bd47d77e88fb0eb341 (diff) | |
download | lines.love-ae429cd78a1f52272d5f51991ebb9b04b542ce01.tar.gz |
bring a few things in sync between run and source
Diffstat (limited to 'edit.lua')
-rw-r--r-- | edit.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/edit.lua b/edit.lua index a939bc4..715fd1a 100644 --- a/edit.lua +++ b/edit.lua @@ -143,7 +143,10 @@ end function edit.draw(State) State.button_handlers = {} App.color(Text_color) - assert(#State.lines == #State.line_cache) + if #State.lines ~= #State.line_cache then + print(('line_cache is out of date; %d when it should be %d'):format(#State.line_cache, #State.lines)) + assert(false) + end if not Text.le1(State.screen_top1, State.cursor1) then print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos) assert(false) |