about summary refs log tree commit diff stats
path: root/select.lua
diff options
context:
space:
mode:
Diffstat (limited to 'select.lua')
-rw-r--r--select.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/select.lua b/select.lua
index 78d18db..b67dd16 100644
--- a/select.lua
+++ b/select.lua
@@ -69,7 +69,7 @@ end
 
 function Text.mouse_pos(State)
   local x,y = App.mouse_x(), App.mouse_y()
-  if y < State.line_cache[State.screen_top1.line].starty then
+  if y < State.top then
     return State.screen_top1.line, State.screen_top1.pos
   end
   for line_index,line in ipairs(State.lines) do