mirror of
https://github.com/mpv-player/mpv.git
synced 2026-05-07 20:02:49 +00:00
console.lua: highlight the first completion suggestion before cycling
2f271a92de made it so that the first completion suggestion is
automatically selected when pressing Enter, if none was manually
selected. So automatically highlight the first completion in yellow to
show this.
This commit is contained in:
committed by
Kacper Michajłow
parent
40724f81e1
commit
a0d416e94b
@@ -367,7 +367,8 @@ local function format_table(list, width_max, rows_max)
|
||||
or '%-' .. math.min(column_widths[column], 99) .. 's'
|
||||
columns[column] = ass_escape(string.format(format_string, list[i]))
|
||||
|
||||
if i == selected_suggestion_index then
|
||||
if i == selected_suggestion_index or
|
||||
(i == 1 and selected_suggestion_index == 0) then
|
||||
columns[column] = styles.selected_suggestion .. columns[column]
|
||||
.. '{\\b0}'.. styles.suggestion
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user