about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-03-23 21:38:33 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-03-23 21:38:33 -0700
commita6dcfc5ac862637719b35c0fda137fdb4015c540 (patch)
tree84f991428c505a70ccd1d6d3a986b75639d1b33b /edit.lua
parent99faf61abbd90f3d5da40788adc43c2883beb470 (diff)
downloadtext.love-a6dcfc5ac862637719b35c0fda137fdb4015c540.tar.gz
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.
Diffstat (limited to 'edit.lua')
-rw-r--r--edit.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/edit.lua b/edit.lua
index 3f87551..b894dde 100644
--- a/edit.lua
+++ b/edit.lua
@@ -310,7 +310,7 @@ function edit.mouse_wheel_move(State, dx,dy)
     for i=1,math.floor(dy) do
       Text.up(State)
     end
-  else
+  elseif dy < 0 then
     State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
     for i=1,math.floor(-dy) do
       Text.down(State)