about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-12-01 22:04:47 -0800
committerKartik K. Agaram <vc@akkartik.com>2023-12-01 22:04:47 -0800
commit42803a209d795453f2a16f7425f146daca7e43de (patch)
treee4edc10cc373d25e2a0c2ae204171b360331e865 /edit.lua
parent510b4989a50ec6495e975be2249be77ee3de9f72 (diff)
parent61336b491bc98ebe379af563ae990b7db011ea6a (diff)
downloadview.love-42803a209d795453f2a16f7425f146daca7e43de.tar.gz
Merge text.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 e606e98..9ee2c14 100644
--- a/edit.lua
+++ b/edit.lua
@@ -130,6 +130,7 @@ end
 
 function edit.mouse_press(State, x,y, mouse_button)
   if State.search_term then return end
+  State.mouse_down = mouse_button
 --?   print_and_log(('edit.mouse_press: cursor at %d,%d'):format(State.cursor1.line, State.cursor1.pos))
   if y < State.top then
     State.old_cursor1 = State.cursor1
@@ -178,6 +179,7 @@ end
 function edit.mouse_release(State, x,y, mouse_button)
   if State.search_term then return end
 --?   print_and_log(('edit.mouse_release(%d,%d): cursor at %d,%d'):format(x,y, State.cursor1.line, State.cursor1.pos))
+  State.mouse_down = nil
   if y < State.top then
     State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
     edit.clean_up_mouse_press(State)