@@ -1192,6 +1192,7 @@ M.cmd.ChatFinder = function()
11921192 M ._chat_finder_opened = true
11931193
11941194 local dir = M .config .chat_dir
1195+ local delete_shortcut = M .config .chat_finder_mappings .delete or M .config .chat_shortcut_delete
11951196
11961197 -- prepare unique group name and register augroup
11971198 local gid = M .helpers .create_augroup (" GpChatFinder" , { clear = true })
@@ -1205,7 +1206,7 @@ M.cmd.ChatFinder = function()
12051206 local right = M .config .style_chat_finder_margin_right or 2
12061207 local picker_buf , picker_win , picker_close , picker_resize = M .render .popup (
12071208 nil ,
1208- " Picker: j/k <Esc>|exit <Enter>|open " .. M . config . chat_shortcut_delete .shortcut .. " |del i|srch" ,
1209+ " Picker: j/k <Esc>|exit <Enter>|open " .. delete_shortcut .shortcut .. " |del i|srch" ,
12091210 function (w , h )
12101211 local wh = h - top - bottom - 2
12111212 local ww = w - left - right - 2
@@ -1457,8 +1458,8 @@ M.cmd.ChatFinder = function()
14571458 -- dd on picker or preview window will delete file
14581459 M .helpers .set_keymap (
14591460 { command_buf , picker_buf , preview_buf },
1460- { " i " , " n " , " v " } ,
1461- M . config . chat_shortcut_delete .shortcut ,
1461+ delete_shortcut . modes ,
1462+ delete_shortcut .shortcut ,
14621463 function ()
14631464 local index = vim .api .nvim_win_get_cursor (picker_win )[1 ]
14641465 local file = picker_files [index ]
0 commit comments