diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-09-17 10:50:19 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-09-17 10:50:19 -0700 |
commit | ba32f7b89da2890794532efccaca3b59b40d7a81 (patch) | |
tree | f7612c0cba9d556d0c5c2a4431c7b6a5be8477be /source_edit.lua | |
parent | d6acf1aaa0ac7ce46f3f9419d2e91b8655b982bf (diff) | |
parent | 2a36ce3c060d4b6ee634421f2a792f450b910ad4 (diff) | |
download | view.love-ba32f7b89da2890794532efccaca3b59b40d7a81.tar.gz |
Merge text.love
Diffstat (limited to 'source_edit.lua')
-rw-r--r-- | source_edit.lua | 5 |
1 files changed, 4 insertions, 1 deletions
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) |