Skip to content

Commit 94a3422

Browse files
authored
fix(file-history): Don't sync panel after it's been destroyed (#238)
1 parent a1fbcaa commit 94a3422

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/diffview/scene/views/file_history/file_history_panel.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ function FileHistoryPanel:update_entries(callback)
211211
-- The parent view has closed: shutdown git jobs and clean up.
212212
finalizer()
213213
update:close()
214-
vim.schedule(function() self.option_panel:sync() end)
214+
vim.schedule(function()
215+
if self.option_panel then
216+
self.option_panel:sync()
217+
end
218+
end)
215219
callback(nil, JobStatus.KILLED)
216220
return
217221
end

0 commit comments

Comments
 (0)