diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2025-05-15 10:27:09 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2025-05-15 10:27:09 -0700 |
commit | f1bc6b321bf8bdccee7f2f7561c3fac9f60e7456 (patch) | |
tree | 46ef690851babe7c8e482d657bd78d68b6bbecbf | |
parent | eae257540953e92288028ae7c75716d9ac519166 (diff) | |
download | mpv-iptv-menu-f1bc6b321bf8bdccee7f2f7561c3fac9f60e7456.tar.gz mpv-iptv-menu-f1bc6b321bf8bdccee7f2f7561c3fac9f60e7456.tar.xz |
display number of matches in search
-rw-r--r-- | main.lua | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -287,6 +287,10 @@ local function osd_menu_title(menu) asscape(menu.search_text:sub( menu.search_cursor))) end + + str = str:gsub('<colours.info>', colours.info) + str = str:gsub('<num_matches>', #menu.options) + str = str:gsub('<num_total>', #menu.search_options) end return col .. ' ยป ' .. str @@ -931,7 +935,8 @@ local function start_search() local menu = menus[depth] if menu.type == 'search' then -- resume search - menu.title = 'Searching: <text_with_cursor>' + menu.title = 'Searching: <text_with_cursor>' .. + ' <colours.info>(<num_matches>/<num_total>)' menu.search_active = true menu.search_cursor = #menu.search_text + 1 menu.cursor = 1 @@ -939,7 +944,8 @@ local function start_search() update_osd() else push_menu({ - title='Searching: <text_with_cursor>', + title='Searching: <text_with_cursor>' .. + ' <colours.info>(<num_matches>/<num_total>)', type='search', search_active=true, search_options=search_menu_options(menu.options), @@ -955,7 +961,8 @@ end local function end_search() local menu = menus[depth] menu.search_active = false - menu.title = 'Search results: <text>' + menu.title = 'Search results: <text>' .. + ' <colours.info>(<num_matches>/<num_total>)' update_osd() bind_menu_keys() end |