File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,12 @@ local function letter_hotkey(config)
239239 end
240240 end
241241
242+ local confirm_keys = type (config .confirm_key ) == ' table' and config .confirm_key
243+ or { config .confirm_key }
244+ for _ , key in ipairs (confirm_keys ) do
245+ table.insert (used_keys , key :byte ())
246+ end
247+
242248 math.randomseed (os.time ())
243249
244250 -- Create key table, fill it with unused characters.
@@ -538,7 +544,11 @@ local function theme_instance(config)
538544 load_packages (config )
539545 gen_center (plist , config )
540546 gen_footer (config )
541- map_key (config , config .confirm_key or ' <CR>' )
547+ local confirm_keys = type (config .confirm_key ) == ' table' and config .confirm_key
548+ or { config .confirm_key or ' <CR>' }
549+ for _ , key in ipairs (confirm_keys ) do
550+ map_key (config , key )
551+ end
542552 require (' dashboard.events' ).register_lsp_root (config .path )
543553 local size = math.floor (vim .o .lines / 2 )
544554 - math.ceil (api .nvim_buf_line_count (config .bufnr ) / 2 )
You can’t perform that action at this time.
0 commit comments