-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
20 lines (17 loc) · 728 Bytes
/
Copy pathinit.lua
File metadata and controls
20 lines (17 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'config.lazy'
local default_confirm = vim.fn.confirm
--- Wrapper around `vim.fn.confirm` that works around a Neovim 0.12 `_extui`
--- bug where the message and the `(Y)es (N)o` choice prompt are concatenated
--- onto the same line in the dialog float (see
--- `runtime/lua/vim/_core/ui2/messages.lua`). Appending a trailing newline to
--- the message forces the prompt onto its own line in extui, and is a no-op
--- visually on the legacy message grid.
---@param msg string
---@param choices string
---@param default? integer
---@param type? string
---@return integer
local function my_confirm(msg, choices, default, type)
return default_confirm(msg .. '\n', choices, default, type)
end
vim.fn.confirm = my_confirm