@@ -232,36 +232,24 @@ function Dialog:format_legend(output, options)
232232 end
233233
234234 if keymaps .up and # keymaps .up > 0 and keymaps .down and # keymaps .down > 0 then
235- local line = output :add_line (string.format (' Move: j/k or %s/%s' , ' ↑' , ' ↓' ))
236- output :add_extmark (line - 1 , { start_col = 6 , end_col = 9 , hl_group = ' OpencodeQuestionKeyHint' } --[[ @as OutputExtmark]] )
237- output :add_extmark (line - 1 , { start_col = 13 , end_col = 16 , hl_group = ' OpencodeQuestionKeyHint' } --[[ @as OutputExtmark]] )
235+ local line = output :add_line (' Move: `j/k` or `↑/↓`' )
238236 end
239237
240238 if keymaps .left and # keymaps .left > 0 and keymaps .right and # keymaps .right > 0 then
241- local line = output :add_line (' Question: h/l or <-/->' )
242- output :add_extmark (line - 1 , { start_col = 10 , end_col = 13 , hl_group = ' OpencodeQuestionKeyHint' } --[[ @as OutputExtmark]] )
243- output :add_extmark (line - 1 , { start_col = 17 , end_col = 23 , hl_group = ' OpencodeQuestionKeyHint' } --[[ @as OutputExtmark]] )
239+ local line = output :add_line (' Question: `h/l` or `<-/->`' )
244240 end
245241
246242 if keymaps .select and keymaps .select ~= ' ' then
247- local select_text = ' Select: <CR>'
243+ local select_text = ' Select: ` <CR>` '
248244 if keymaps .number_shortcuts and option_count > 0 then
249245 local max_shortcut = math.min (option_count , 9 )
250- select_text = select_text .. string.format (' or 1-%d' , max_shortcut )
246+ select_text = select_text .. string.format (' or ` 1-%d` ' , max_shortcut )
251247 end
252248 local line = output :add_line (select_text )
253- output :add_extmark (line - 1 , { start_col = 8 , end_col = 12 , hl_group = ' OpencodeQuestionKeyHint' } --[[ @as OutputExtmark]] )
254- if keymaps .number_shortcuts and option_count > 0 then
255- local max_shortcut = math.min (option_count , 9 )
256- local suffix = string.format (' 1-%d' , max_shortcut )
257- local start_col = # select_text - # suffix
258- output :add_extmark (line - 1 , { start_col = start_col , end_col = # select_text , hl_group = ' OpencodeQuestionKeyHint' } --[[ @as OutputExtmark]] )
259- end
260249 end
261250
262251 if keymaps .dismiss and keymaps .dismiss ~= ' ' then
263- local line = output :add_line (' Close: <Esc>' )
264- output :add_extmark (line - 1 , { start_col = 7 , end_col = 12 , hl_group = ' OpencodeQuestionKeyHint' } --[[ @as OutputExtmark]] )
252+ local line = output :add_line (' Close: `<Esc>`' )
265253 end
266254 else
267255 local message = options .unfocused_message or ' Focus Opencode window to interact'
0 commit comments