about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-08 15:45:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-08 15:45:45 -0700
commitabcc18002bf036ab01115447cabb9321767c71fb (patch)
tree847286fd7ae6187782a40d94dfcc8fd61d975f15 /main.lua
parent9fb8f25030de2f9eff87003a1ff71e3bc5fdbc94 (diff)
downloadtext.love-abcc18002bf036ab01115447cabb9321767c71fb.tar.gz
add args to some functions
  - Text.to_pos_on_line
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 483f560..7d5b073 100644
--- a/main.lua
+++ b/main.lua
@@ -353,7 +353,7 @@ function App.mousepressed(x,y, mouse_button)
         Mousepress_shift = App.shift_down()
         Selection1 = {
             line=line_index,
-            pos=Text.to_pos_on_line(line, x, y),
+            pos=Text.to_pos_on_line(line, x, y, Margin_left, App.screen.width-Margin_right),
         }
 --?         print('selection', Selection1.line, Selection1.pos)
         break
@@ -389,7 +389,7 @@ function App.mousereleased(x,y, button)
 --?           print('reset selection')
           Cursor1 = {
               line=line_index,
-              pos=Text.to_pos_on_line(line, x, y),
+              pos=Text.to_pos_on_line(line, x, y, Margin_left, App.screen.width-Margin_right),
           }
 --?           print('cursor', Cursor1.line, Cursor1.pos)
           if Mousepress_shift then