Skip to content

Commit dc163c8

Browse files
committed
fix; Null check spinner when closing chat
Its possible that spinner is not set yet when opening new window with custom layout
1 parent 4b2e631 commit dc163c8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lua/CopilotChat/chat.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ function Chat:open(config)
172172
end
173173

174174
function Chat:close()
175-
self.spinner:finish()
175+
if self.spinner then
176+
self.spinner:finish()
177+
end
176178
if self:visible() then
177179
vim.api.nvim_win_close(self.winnr, true)
178180
self.winnr = nil

0 commit comments

Comments
 (0)