about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-25 15:00:13 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-25 15:00:13 -0700
commit815c4f010a9cba64c4508490b763abd337a8a5a8 (patch)
treea164fa62dc7ca6ffb6d0fd39ec4f65030e364230 /main.lua
parent34950353b958979cf47611c77e271a0db3dc8c8f (diff)
downloadlines.love-815c4f010a9cba64c4508490b763abd337a8a5a8.tar.gz
assert for a bug I saw a while ago but can no longer reproduce
I saw screen_top not at start of screen line, but at cursor location in
middle of line.
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 1c3ef50..0dd6d5f 100644
--- a/main.lua
+++ b/main.lua
@@ -124,6 +124,7 @@ function App.draw()
   for line_index,line in ipairs(Lines) do
     line.y = nil
   end
+  assert(Screen_top1.line < Cursor1.line or (Screen_top1.line == Cursor1.line and Screen_top1.pos <= Cursor1.pos))
   local y = 15
 --?   print('== draw')
   for line_index,line in ipairs(Lines) do