drop some extra args

This commit is contained in:
Kartik K. Agaram 2022-07-17 08:57:13 -07:00
parent b95206fd0d
commit c0ea369607
1 changed files with 4 additions and 4 deletions

View File

@ -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