File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -958,11 +958,9 @@ function goto_parent_dir()
958958end
959959
960960function try_open_at_cursor ()
961- if micro .CurPane () ~= tree_view or scanlist_is_empty () then
962- return
961+ if micro .CurPane () == tree_view then
962+ try_open_at_y ( tree_view . Cursor . Loc . Y )
963963 end
964-
965- try_open_at_y (tree_view .Cursor .Loc .Y )
966964end
967965
968966-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1089,7 +1087,7 @@ function onMousePress(view)
10891087 if view == tree_view then
10901088 -- Try to open whatever is at the click's y index
10911089 -- Will go into/back dirs based on what's clicked, nothing gets expanded
1092- try_open_at_y ( tree_view . Cursor . Loc . Y )
1090+ try_open_at_cursor ( )
10931091 -- Don't actually allow the mousepress to trigger, so we avoid highlighting stuff
10941092 return false
10951093 end
@@ -1136,7 +1134,7 @@ function preIndentSelection(view)
11361134 tab_pressed = true
11371135 -- Open the file
11381136 -- Using tab instead of enter, since enter won't work with Readonly
1139- try_open_at_y ( tree_view . Cursor . Loc . Y )
1137+ try_open_at_cursor ( )
11401138 -- Don't actually insert a tab
11411139 return false
11421140 end
You can’t perform that action at this time.
0 commit comments