From c0ea3696075fb6e8369bb67449153e834d684101 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 17 Jul 2022 08:57:13 -0700 Subject: drop some extra args --- edit.lua | 8 ++++---- 1 file 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 -- cgit 1.4.1-2-gfad0