fix: file menu not updating active item and other menu issues
- Preselecting previous folder wasn't working sometimes. - `join_path()` didn't account for drive letters already having a separator. Also refactors how `open_file_navigation_menu()` stores menu items value. As a side effect this is now a lot faster as we don't have to serialize each item's path into meta table, but instead we now store just a path string and handle it as needed. closes #355
This commit is contained in:
@@ -900,7 +900,7 @@ mp.add_key_binding(nil, 'open-file', function()
|
||||
-- Update active file in directory navigation menu
|
||||
local function handle_file_loaded()
|
||||
if Menu:is_open('open-file') then
|
||||
Elements.menu:activate_value(normalize_path(mp.get_property_native('path')))
|
||||
Elements.menu:activate_one_value(normalize_path(mp.get_property_native('path')))
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user