Skip to content

Commit

Permalink
view:terminate calls view.root:terminate if view.root is not a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
SidOfc committed Mar 18, 2024
1 parent da6ba1f commit dc9efd9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/carbon/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ function view:terminate()
vim.api.nvim_buf_delete(bufnr, { force = true })
end

if not util.is_directory(self.root.path) then
self.root:terminate()
end

if reopen then
vim.cmd.Carbon()
end
Expand Down

0 comments on commit dc9efd9

Please sign in to comment.