about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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