about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-11 20:50:53 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-11 20:54:17 -0700
commitff88238ff1b1eea63a3e4d827ed0e9acb254d0d1 (patch)
tree1308c9636e1e6cb33e68d15e0a88699bae605b9f /text.lua
parente51ce129696320b729506a2c3f7c76bba402924e (diff)
downloadtext.love-ff88238ff1b1eea63a3e4d827ed0e9acb254d0d1.tar.gz
bugfix: BSOD in #4.
I messed up a function call in commit 391d764e13.
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/text.lua b/text.lua
index 0a599ce..492b682 100644
--- a/text.lua
+++ b/text.lua
@@ -666,11 +666,11 @@ function Text.snap_cursor_to_bottom_of_screen()
   Text.redraw_all()  -- if we're scrolling, reclaim all fragments to avoid memory leaks
 end
 
-function Text.in_line(line, x,y)
+function Text.in_line(line_index,line, x,y)
   if line.y == nil then return false end  -- outside current page
   if x < 25 then return false end
   if y < line.y then return false end
-  Text.populate_screen_line_starting_pos(Cursor1.line)
+  Text.populate_screen_line_starting_pos(line_index)
   return y < line.y + #line.screen_line_starting_pos * Line_height
 end