fix(ui): use nowait for q mapping in floating window (#16427)

This commit is contained in:
ii14 2021-11-24 23:57:33 +01:00 committed by GitHub
parent a2e5c2f7c8
commit c132144d24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1314,7 +1314,7 @@ function M.open_floating_preview(contents, syntax, opts)
api.nvim_buf_set_option(floating_bufnr, 'modifiable', false)
api.nvim_buf_set_option(floating_bufnr, 'bufhidden', 'wipe')
api.nvim_buf_set_keymap(floating_bufnr, "n", "q", "<cmd>bdelete<cr>", {silent = true, noremap = true})
api.nvim_buf_set_keymap(floating_bufnr, "n", "q", "<cmd>bdelete<cr>", {silent = true, noremap = true, nowait = true})
M.close_preview_autocmd(opts.close_events, floating_winnr)
-- save focus_id