menu: restore go to letter for folders (#13460)
Some checks are pending
macos / macOS 13 x86-64 🔨15.2 🎯10.15 (push) Waiting to run
macos / macOS 14 ARM64 🔨15.4 🎯11.0 (push) Waiting to run

This commit is contained in:
hius07
2025-03-26 11:30:24 +02:00
committed by GitHub
parent 29908800b9
commit c2d41f2c41

View File

@@ -1306,7 +1306,7 @@ end
function Menu:goToMenuItemMatching(search_string, goto_letter)
search_string = Utf8Proc.lowercase(util.fixUtf8(search_string, "?"))
for i, item in ipairs(self.item_table) do
if not item.is_go_up and not (goto_letter and item.is_file == false) then -- skip folders in "Go to letter"
if not item.is_go_up then
local item_text = Utf8Proc.lowercase(util.fixUtf8(item.text, "?"))
local idx = item_text:find(search_string)
if idx and (idx == 1 or not goto_letter) then