about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-09-15 23:56:49 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-09-15 23:56:49 -0700
commit09c76c82c2a415839ad0d50d9fc14e883caeae6e (patch)
tree104401a62623498d9cf9eabe50159e6eec1668f3 /edit.lua
parent1a88b4a2907a78fd4a1febf32c74d0305aff6ba0 (diff)
parent715c6fd32fadf8b14f4755cc31bacfb21c7f7dac (diff)
downloadview.love-09c76c82c2a415839ad0d50d9fc14e883caeae6e.tar.gz
Merge lines.love
Diffstat (limited to 'edit.lua')
-rw-r--r--edit.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/edit.lua b/edit.lua
index 446d76d..3819d06 100644
--- a/edit.lua
+++ b/edit.lua
@@ -233,11 +233,13 @@ end
 function edit.mouse_wheel_move(State, dx,dy)
   if dy > 0 then
     State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
+    edit.put_cursor_on_next_text_line(State)
     for i=1,math.floor(dy) do
       Text.up(State)
     end
   elseif dy < 0 then
     State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
+    edit.put_cursor_on_next_text_line(State)
     for i=1,math.floor(-dy) do
       Text.down(State)
     end