about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-06-03 10:43:20 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-06-03 10:44:11 -0700
commitcf0ba7c15431221e90f6aee87ea5b69ef0b18ea4 (patch)
treee07dc2253e5fb168e72597dec39f45296fce87ae /edit.lua
parent3114176ebd5b9895b5f67c759a2a705f673a4ac0 (diff)
downloadview.love-cf0ba7c15431221e90f6aee87ea5b69ef0b18ea4.tar.gz
handle wrapping lines
Diffstat (limited to 'edit.lua')
-rw-r--r--edit.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/edit.lua b/edit.lua
index ddd17c1..5918165 100644
--- a/edit.lua
+++ b/edit.lua
@@ -232,8 +232,8 @@ function edit.mouse_press(State, x,y, mouse_button)
     State.old_selection1 = State.selection1
     State.mousepress_shift = App.shift_down()
     State.selection1 = {
-        line=1,
-        pos=1,
+        line=State.screen_top1.line,
+        pos=State.screen_top1.pos,
     }
     return
   end