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.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/edit.lua b/edit.lua
index 3e92a54..ddd17c1 100644
--- a/edit.lua
+++ b/edit.lua
@@ -227,6 +227,17 @@ function edit.mouse_press(State, x,y, mouse_button)
     return
   end
 
+  if y < State.top then
+    State.old_cursor1 = State.cursor1
+    State.old_selection1 = State.selection1
+    State.mousepress_shift = App.shift_down()
+    State.selection1 = {
+        line=1,
+        pos=1,
+    }
+    return
+  end
+
   for line_index,line in ipairs(State.lines) do
     if line.mode == 'text' then
       if Text.in_line(State, line_index, x,y) then