History

select.lua: don't needlessly initialize default_item

Guido Cella committed 2 years ago

Commit 8f596b41 parent 99fd55a1 file · +3 −3Browse files

Showing the changes to player/lua/select.lua (1 of 1 file). Show all

Unified · Split

player/lua/select.lua+3−3
@@ -27,7 +27,7 @@ end · 26 unmodified lines
2727
2828 mp.add_forced_key_binding(nil, "select-playlist", function ()
2929 local playlist = {}
30− local default_item = 1
30+ local default_item
3131
3232 for i, entry in ipairs(mp.get_property_native("playlist")) do
3333 playlist[i] = select(2, utils.split_path(entry.filename))
@@ -100,7 +100,7 @@ end) · 66 unmodified lines
100100 local function select_track(property, type, prompt, error)
101101 local tracks = {}
102102 local items = {}
103− local default_item = 1
103+ local default_item
104104 local track_id = mp.get_property_native(property)
105105
106106 for _, track in ipairs(mp.get_property_native("track-list")) do
@@ -260,7 +260,7 @@ mp.add_forced_key_binding(nil, "select-audio-device", function () · 153 unmodified lines
260260 -- otherwise its value is just auto and there is no current-audio-device
261261 -- property.
262262 local selected_device = mp.get_property("audio-device")
263− local default_item = 1
263+ local default_item
264264
265265 if #devices == 0 then
266266 show_error("No available audio devices.")

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t