about summary refs log tree commit diff stats
path: root/source_edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2024-06-27 22:15:12 -0700
committerKartik K. Agaram <vc@akkartik.com>2024-06-27 22:15:12 -0700
commit54addeb3b782125e7e0024347d6961efcbc4964c (patch)
tree4edac1fdbb778011b642a11f2c80ba9b98c3f4dd /source_edit.lua
parentdbd58e81755607de511845564ac3353eeb369ac2 (diff)
parent91a08eec2b39a38db9a6952a5701617da549d970 (diff)
downloadtext.love-54addeb3b782125e7e0024347d6961efcbc4964c.tar.gz
Merge lines.love
Diffstat (limited to 'source_edit.lua')
-rw-r--r--source_edit.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/source_edit.lua b/source_edit.lua
index 5351857..34e12c3 100644
--- a/source_edit.lua
+++ b/source_edit.lua
@@ -308,7 +308,7 @@ function edit.mouse_release(State, x,y, mouse_button)
   else
 --?     print_and_log('edit.mouse_release: no current drawing')
     if y < State.top then
-      State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
+      State.cursor1 = deepcopy(State.screen_top1)
       edit.clean_up_mouse_press(State)
       return
     end
@@ -351,7 +351,7 @@ 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}
+    State.cursor1 = deepcopy(State.screen_top1)
     edit.put_cursor_on_next_text_line(State)
     for i=1,math.floor(dy) do
       Text.up(State)