about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-17 08:57:13 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-17 09:14:10 -0700
commitc0ea3696075fb6e8369bb67449153e834d684101 (patch)
treea5115e5f8f86e29b9354fc492c024fef83d73bd5
parentb95206fd0d22e63ab94dd8c66f030fbc7588cc22 (diff)
downloadtext.love-c0ea3696075fb6e8369bb67449153e834d684101.tar.gz
drop some extra args
-rw-r--r--edit.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/edit.lua b/edit.lua
index 897b45e..f1c032f 100644
--- a/edit.lua
+++ b/edit.lua
@@ -200,7 +200,7 @@ function edit.mouse_pressed(State, x,y, mouse_button)
 
   for line_index,line in ipairs(State.lines) do
     if line.mode == 'text' then
-      if Text.in_line(State, line, x,y, State.left, State.right) then
+      if Text.in_line(State, line, x,y) then
         -- delicate dance between cursor, selection and old cursor/selection
         -- scenarios:
         --  regular press+release: sets cursor, clears selection
@@ -215,7 +215,7 @@ function edit.mouse_pressed(State, x,y, mouse_button)
         State.mousepress_shift = App.shift_down()
         State.selection1 = {
             line=line_index,
-            pos=Text.to_pos_on_line(State, line, x, y, State.left, State.right),
+            pos=Text.to_pos_on_line(State, line, x, y),
         }
 --?         print('selection', State.selection1.line, State.selection1.pos)
         break
@@ -245,11 +245,11 @@ function edit.mouse_released(State, x,y, mouse_button)
   else
     for line_index,line in ipairs(State.lines) do
       if line.mode == 'text' then
-        if Text.in_line(State, line, x,y, State.left, State.right) then
+        if Text.in_line(State, line, x,y) then
 --?           print('reset selection')
           State.cursor1 = {
               line=line_index,
-              pos=Text.to_pos_on_line(State, line, x, y, State.left, State.right),
+              pos=Text.to_pos_on_line(State, line, x, y),
           }
 --?           print('cursor', State.cursor1.line, State.cursor1.pos)
           if State.mousepress_shift then