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:
Guido Cella
2024-11-24 11:10:08 +01:00
committed by Kacper Michajłow
parent 40724f81e1
commit a0d416e94b
+2 -1
View File
@@ -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