Skip to content

Commit 02be707

Browse files
committed
fix: make sessions widget more robust
1 parent 68a2564 commit 02be707

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lua/dap-view/sessions/view.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ local launch_and_refresh_widget = function()
2121
end
2222

2323
sessions_widget.refresh()
24+
25+
views.cleanup_view(not dap.session(), "No active session")
2426
end
2527

2628
M.show = function()
2729
winbar.refresh_winbar("sessions")
2830

29-
if views.cleanup_view(not dap.session(), "No active session") then
30-
return
31-
end
32-
3331
launch_and_refresh_widget()
3432
end
3533

0 commit comments

Comments
 (0)