about summary refs log tree commit diff stats
path: root/source_text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-05-14 17:23:08 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-05-14 17:23:08 -0700
commitc96be4b007177c0232059f3e602784268506c920 (patch)
treea321298e2b7c91f5e2e9fa67b346727e863c3438 /source_text.lua
parent47730a2b3381b4431529e32a2b268ac1cb0a85a6 (diff)
downloadlines.love-c96be4b007177c0232059f3e602784268506c920.tar.gz
add an assert
I added this to catch a rare bug. I've had it locally for a few weeks
now without hitting it. Doesn't hurt to publish it.
Diffstat (limited to 'source_text.lua')
-rw-r--r--source_text.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/source_text.lua b/source_text.lua
index ae5f88c..290d982 100644
--- a/source_text.lua
+++ b/source_text.lua
@@ -486,6 +486,7 @@ end
 function Text.down(State)
   assert(State.lines[State.cursor1.line].mode == 'text')
 --?   print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
+  assert(State.cursor1.pos)
   if Text.cursor_at_final_screen_line(State) then
     -- line is done, skip to next text line
 --?     print('cursor at final screen line of its line')