some minor cleanup
I can't see the mouse wheel ever setting dx, but it's more obvious now that the editor doesn't support panning left/right.
This commit is contained in:
parent
99faf61abb
commit
a6dcfc5ac8
2
edit.lua
2
edit.lua
|
@ -310,7 +310,7 @@ function edit.mouse_wheel_move(State, dx,dy)
|
||||||
for i=1,math.floor(dy) do
|
for i=1,math.floor(dy) do
|
||||||
Text.up(State)
|
Text.up(State)
|
||||||
end
|
end
|
||||||
else
|
elseif dy < 0 then
|
||||||
State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
|
State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
|
||||||
for i=1,math.floor(-dy) do
|
for i=1,math.floor(-dy) do
|
||||||
Text.down(State)
|
Text.down(State)
|
||||||
|
|
|
@ -268,7 +268,7 @@ function log_browser.mouse_wheel_move(State, dx,dy)
|
||||||
for i=1,math.floor(dy) do
|
for i=1,math.floor(dy) do
|
||||||
log_browser.up(State)
|
log_browser.up(State)
|
||||||
end
|
end
|
||||||
else
|
elseif dy < 0 then
|
||||||
for i=1,math.floor(-dy) do
|
for i=1,math.floor(-dy) do
|
||||||
log_browser.down(State)
|
log_browser.down(State)
|
||||||
end
|
end
|
||||||
|
|
4
run.lua
4
run.lua
|
@ -163,9 +163,9 @@ function run.mouse_release(x,y, mouse_button)
|
||||||
return edit.mouse_release(Editor_state, x,y, mouse_button)
|
return edit.mouse_release(Editor_state, x,y, mouse_button)
|
||||||
end
|
end
|
||||||
|
|
||||||
function run.mouse_wheel_move(x,y)
|
function run.mouse_wheel_move(dx,dy)
|
||||||
Cursor_time = 0 -- ensure cursor is visible immediately after it moves
|
Cursor_time = 0 -- ensure cursor is visible immediately after it moves
|
||||||
return edit.mouse_wheel_move(Editor_state, x,y)
|
return edit.mouse_wheel_move(Editor_state, dx,dy)
|
||||||
end
|
end
|
||||||
|
|
||||||
function run.text_input(t)
|
function run.text_input(t)
|
||||||
|
|
|
@ -311,7 +311,7 @@ function edit.mouse_wheel_move(State, dx,dy)
|
||||||
for i=1,math.floor(dy) do
|
for i=1,math.floor(dy) do
|
||||||
Text.up(State)
|
Text.up(State)
|
||||||
end
|
end
|
||||||
else
|
elseif dy < 0 then
|
||||||
State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
|
State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
|
||||||
for i=1,math.floor(-dy) do
|
for i=1,math.floor(-dy) do
|
||||||
Text.down(State)
|
Text.down(State)
|
||||||
|
|
Loading…
Reference in New Issue