From b90a54a9cb7e2134d6d41112feaf67cb2f09c1be Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 15 Sep 2022 11:26:45 -0700 Subject: new test --- source_edit.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source_edit.lua') diff --git a/source_edit.lua b/source_edit.lua index 34752d0..c17ce26 100644 --- a/source_edit.lua +++ b/source_edit.lua @@ -127,7 +127,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.screen_top1.posB, State.cursor1.line, State.cursor1.pos, State.cursor1.posB) assert(false) -- cgit 1.4.1-2-gfad0