Commit 34160a7 1 parent 0ce9978 commit 34160a7 Copy full SHA for 34160a7
File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 74
74
--- @eval return require('dapui.config')._format_default()
75
75
--- @param user_config ? dapui.Config
76
76
function dapui .setup (user_config )
77
+ util .stop_render_tasks ()
78
+
77
79
config .setup (user_config )
78
80
79
81
local client = require (" dapui.client" )(dap .session )
Original file line number Diff line number Diff line change @@ -5,11 +5,20 @@ local M = {}
5
5
6
6
local api = async .api
7
7
8
+ local render_tasks = {}
9
+
10
+ function M .stop_render_tasks ()
11
+ for _ , task in ipairs (render_tasks ) do
12
+ task .cancel ()
13
+ end
14
+ render_tasks = {}
15
+ end
16
+
8
17
--- @return function
9
18
function M .create_render_loop (render )
10
19
local render_event = async .control .event ()
11
20
12
- async .run (function ()
21
+ render_tasks [ # render_tasks + 1 ] = async .run (function ()
13
22
while true do
14
23
render_event .wait ()
15
24
render_event .clear ()
You can’t perform that action at this time.
0 commit comments