Skip to content

Commit 5aaf417

Browse files
committed
Fix filemanager mouse click
1 parent 216ec3a commit 5aaf417

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

filemanager-plugin/filemanager.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,14 +1085,11 @@ function onPreviousSplit(view)
10851085
end
10861086

10871087
-- On click, open at the click's y
1088-
function preMousePress(view, event)
1088+
function onMousePress(view)
10891089
if view == tree_view then
1090-
local x, y = event:Position()
1091-
-- Fixes the y because softwrap messes with it
1092-
local new_x, new_y = tree_view:GetMouseClickLocation(x, y)
10931090
-- Try to open whatever is at the click's y index
10941091
-- Will go into/back dirs based on what's clicked, nothing gets expanded
1095-
try_open_at_y(new_y)
1092+
try_open_at_y(tree_view.Cursor.Loc.Y)
10961093
-- Don't actually allow the mousepress to trigger, so we avoid highlighting stuff
10971094
return false
10981095
end

0 commit comments

Comments
 (0)