diff options
| author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-02-03 23:03:03 -0800 |
|---|---|---|
| committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-02-03 23:03:03 -0800 |
| commit | 420e94b052f458a6b9eb14f9d6b01f6add17f68c (patch) | |
| tree | 0efc7df7268c03e8de8decedd12e9ff59b40f73c | |
| parent | 554e833b1a39ede9aef234449fc8992435f10751 (diff) | |
| download | mpv-iptv-menu-420e94b052f458a6b9eb14f9d6b01f6add17f68c.tar.gz mpv-iptv-menu-420e94b052f458a6b9eb14f9d6b01f6add17f68c.tar.xz | |
allow exiting search with mouse
| -rw-r--r-- | main.lua | 6 | ||||
| -rw-r--r-- | rt.lua | 11 |
2 files changed, 17 insertions, 0 deletions
@@ -217,6 +217,12 @@ input.define_mapping('SEARCH', { ['Ctrl+e'] = {rt.search_cursor_end}, ['Ctrl+s'] = {rt.toggle_menu_sort}, + + _targets = { + menu = { + ['MBTN_LEFT_DBL'] = {rt.search_dbl_click_menu}, + }, + }, }) input.set_mapping('MENU') input.activate(true) @@ -759,6 +759,17 @@ function rt.dbl_right_click_menu() rt.open_option_info(menu.options[pos]) end +function rt.search_dbl_click_menu() + local line = osd.mstate.option_line + if line >= -1 then + return + end + + state.depth = state.depth + line + 1 + osd:dirty() + input.set_mapping('MENU') +end + function rt.reload_data() if state.depth > 1 then osd:flash_error('Can only reload data from root menu') |
