about summary refs log tree commit diff stats
path: root/main.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 /main.lua
parente51ce129696320b729506a2c3f7c76bba402924e (diff)
downloadtext.love-ff88238ff1b1eea63a3e4d827ed0e9acb254d0d1.tar.gz
bugfix: BSOD in #4.
I messed up a function call in commit 391d764e13.
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.lua b/main.lua
index b3e0483..e3d2ef4 100644
--- a/main.lua
+++ b/main.lua
@@ -277,7 +277,7 @@ function App.mousepressed(x,y, mouse_button)
 
   for line_index,line in ipairs(Lines) do
     if line.mode == 'text' then
-      if Text.in_line(line, x,y) then
+      if Text.in_line(line_index,line, x,y) then
         -- delicate dance between cursor, selection and old cursor
         -- manual tests:
         --  regular press+release: sets cursor, clears selection
@@ -315,7 +315,7 @@ function App.mousereleased(x,y, button)
   else
     for line_index,line in ipairs(Lines) do
       if line.mode == 'text' then
-        if Text.in_line(line, x,y) then
+        if Text.in_line(line_index,line, x,y) then
           Cursor1 = {line=line_index, pos=Text.to_pos_on_line(line, x, y)}
           if Mousepress_shift then
             if Old_selection1.line == nil then