Closed dnguyener closed 1 year ago
Set
use_icons = false
in your config to stop seeing this message. set this in your config
The issue still occurs with it set to false.
return {
{
'sindrets/diffview.nvim',
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
require("diffview").setup({
use_icons = false,
})
end
},
{
"folke/noice.nvim",
config = function()
require("noice").setup()
end,
dependencies = {
"MunifTanjim/nui.nvim",
}
}
}
1 Error executing Lua callback: ...nvim/lua/diffview/scene/views/standard/standard_view.lua:60: Vim(tabclose):E445: Other window contains changes
2 stack traceback:
3 [C]: in function 'cmd'
4 ...nvim/lua/diffview/scene/views/standard/standard_view.lua:60: in function 'close'
5 .../diffview/scene/views/file_history/file_history_view.lua:74: in function 'close'
6 ...ocal/share/nvim/lazy/diffview.nvim/lua/diffview/init.lua:138: in function 'close'
7 ....local/share/nvim/lazy/diffview.nvim/plugin/diffview.lua:38: in function <....local/share/nvim/lazy/diffview.nvim/plugin/diffview.lua:37>
You either have:
'hidden'
disabled and you're trying to close a diffview while you have windows containing buffers with unsaved changes in the same tab page.
:set hidden
or :write
all modified buffers before trying to close the tab.noice
uses modifiable buffers combined with bufhidden=delete
or bufhidden=wipe
and this buffer is considered to be 'modified'
.
Here's a simple fix to this
return {
"sindrets/diffview.nvim",
keys = {
{ "<leader>jj", "<cmd>set hidden<cr><cmd>DiffviewClose<cr><cmd>set nohidden<cr>" },
},
opts = {},
}
Hello,
I'm getting the below error when running
DiffviewClose
with noice installed. To reproduce, first runDiffviewFileHistory
and thanDiffviewClose
.Minimal Config: