summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/main.lua b/main.lua
index 57a4e12..c139c07 100644
--- a/main.lua
+++ b/main.lua
@@ -101,9 +101,9 @@ local function save_favourites()
end
local function set_cursor(pos, opts)
- state:menu():set_cursor(pos, osd_menu_lines(), opts)
+ local moved = state:menu():set_cursor(pos, osd_menu_lines(), opts)
- if not (opts and opts.skip_redraw) then
+ if moved and not (opts and opts.skip_redraw) then
update_osd()
end
end
@@ -117,7 +117,7 @@ local function cursor_down()
end
local function cursor_start()
- set_cursor(0)
+ set_cursor(1)
end
local function cursor_end()
@@ -179,7 +179,7 @@ local function move_option_down()
end
local function move_option_start()
- move_option(0)
+ move_option(1)
end
local function move_option_end()
@@ -608,7 +608,8 @@ local function open_option_epg(opt)
title = 'EPG: ' .. opt.name .. ' (' .. ch .. ')',
type = 'epg',
})
- set_cursor(curr, {centre = true})
+ set_cursor(curr, {centre = true, skip_redraw = true})
+ update_osd()
end
local function add_info_field(dst, k, v, fmt)
@@ -890,7 +891,7 @@ local function start_search()
menu.title = title
menu.search_active = true
menu:set_search_cursor(#menu.search_text + 1)
- menu:set_cursor(1, osd_menu_lines())
+ menu:set_cursor(1)
else
menu = state:push_menu({
title = title,