fix(auto_close): do not close when buffer is modified

This commit is contained in:
kiyan
2022-02-22 00:09:12 +01:00
parent 56edf79b4b
commit 600aa849f3

View File

@@ -130,7 +130,8 @@ M.resize = view.resize
local function should_abort_auto_close()
local buf = api.nvim_get_current_buf()
local buftype = api.nvim_buf_get_option(buf, 'ft')
return buftype:match('Telescope') ~= nil
local modified = api.nvim_buf_get_option(buf, 'modified')
return modified or buftype:match('Telescope') ~= nil
end
function M.auto_close()