mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 10:35:08 +02:00
feat: don't prompt smart quit when buffer open in another window (#3636)
This commit is contained in:
parent
b661efb317
commit
c70a094314
1 changed files with 2 additions and 1 deletions
|
@ -2,8 +2,9 @@ local M = {}
|
|||
|
||||
function M.smart_quit()
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local buf_windows = vim.call("win_findbuf", bufnr)
|
||||
local modified = vim.api.nvim_buf_get_option(bufnr, "modified")
|
||||
if modified then
|
||||
if modified and #buf_windows == 1 then
|
||||
vim.ui.input({
|
||||
prompt = "You have unsaved changes. Quit anyway? (y/n) ",
|
||||
}, function(input)
|
||||
|
|
Loading…
Reference in a new issue