new option: close windows displaying removed files (#1300)

This commit is contained in:
emmanueltouzery
2022-05-29 11:23:01 +02:00
committed by GitHub
parent 3a95c5a9cf
commit 3806653d75
5 changed files with 21 additions and 1 deletions

View File

@@ -25,7 +25,9 @@ local function clear_buffer(absolute_path)
a.nvim_set_current_win(winnr)
end
a.nvim_buf_delete(buf.bufnr, { force = true })
close_windows(buf.windows)
if M.close_window then
close_windows(buf.windows)
end
return
end
end
@@ -88,4 +90,8 @@ function M.fn(node)
end
end
function M.setup(opts)
M.close_window = opts.actions.remove_file.close_window
end
return M