about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
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 c8d5a03..0e552b7 100644
--- a/edit.lua
+++ b/edit.lua
@@ -233,6 +233,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 mouse_press_consumed_by_any_button_handler(State, x,y, mouse_button) then
     -- press on a button and it returned 'true' to short-circuit
@@ -297,6 +298,7 @@ end
 function edit.mouse_release(State, x,y, mouse_button)
   if State.search_term then return end
 --?   print_and_log(('edit.mouse_release: cursor at %d,%d'):format(State.cursor1.line, State.cursor1.pos))
+  State.mouse_down = nil
   if State.lines.current_drawing then
     Drawing.mouse_release(State, x,y, mouse_button)
     schedule_save(State)