mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] show filename in a confirmation prompt for Bbye
This commit is contained in:
parent
a281507269
commit
7ded7fc2f3
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,8 @@ endif
|
|||
function s:CloseBuffer(cmd) abort
|
||||
let cmd = a:cmd
|
||||
if &modified
|
||||
let answer = confirm("Save changes?", "&Yes\n&No\n&Cancel")
|
||||
" <https://github.com/neovim/neovim/blob/a282a177d3320db25fa8f854cbcdbe0bc6abde7f/src/nvim/ex_cmds2.c#L1400>
|
||||
let answer = confirm("Save changes to \"".expand('%')."\"?", "&Yes\n&No\n&Cancel")
|
||||
if answer ==# 1 " Yes
|
||||
write
|
||||
elseif answer ==# 2 " No
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue