mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 07:40:05 +08:00
17 lines
324 B
Lua
17 lines
324 B
Lua
local window = {}
|
|
|
|
window.try_close = function(win_id, force)
|
|
if force == nil then
|
|
force = true
|
|
end
|
|
|
|
pcall(vim.api.nvim_win_close, win_id, force)
|
|
end
|
|
|
|
window.close_related_win = function(parent_win_id, child_win_id)
|
|
window.try_close(parent_win_id, true)
|
|
window.try_close(child_win_id, true)
|
|
end
|
|
|
|
return window
|