@@ -63,30 +63,30 @@ M.setup = function(ctx)
63
63
cmd (" MarkmapOpen" , function ()
64
64
reset_arguments ()
65
65
table.insert (arguments , vim .fn .expand " %:p" ) -- current buffer path
66
- if job ~= nil then uv .process_kill (job , 9 ) end
66
+ if job ~= nil then uv .process_kill (job ) end
67
67
job = uv .spawn (run_markmap , { args = arguments }, nil )
68
68
end , { desc = " Show a mental map of the current file" })
69
69
70
70
cmd (" MarkmapSave" , function ()
71
71
reset_arguments ()
72
72
table.insert (arguments , " --no-open" ) -- specific to this command
73
73
table.insert (arguments , vim .fn .expand " %:p" ) -- current buffer path
74
- if job ~= nil then uv .process_kill (job , 9 ) end -- kill -9 jobs
74
+ if job ~= nil then uv .process_kill (job ) end -- kill jobs
75
75
job = uv .spawn (run_markmap , { args = arguments }, nil )
76
76
end , { desc = " Save the HTML file without opening the mindmap" })
77
77
78
78
cmd (" MarkmapWatch" , function ()
79
79
reset_arguments ()
80
80
table.insert (arguments , " --watch" ) -- spetific to this command
81
81
table.insert (arguments , vim .fn .expand " %:p" ) -- current buffer path
82
- if job ~= nil then uv .process_kill (job , 9 ) end
82
+ if job ~= nil then uv .process_kill (job ) end
83
83
job = uv .spawn (run_markmap , { args = arguments }, nil )
84
84
end ,
85
85
{ desc = " Show a mental map of the current file and watch for changes" }
86
86
)
87
87
88
88
cmd (" MarkmapWatchStop" , function ()
89
- if job ~= nil then uv .process_kill (job , 9 ) end -- kill -9 jobs
89
+ if job ~= nil then uv .process_kill (job ) end -- kill jobs
90
90
end , { desc = " Manually stops markmap watch" })
91
91
92
92
-- Autocmds --------------------------------------------------------------
@@ -105,7 +105,7 @@ M.setup = function(ctx)
105
105
-- Otherwise, use grace_period
106
106
local current_time = uv .now ()
107
107
if current_time - last_execution >= grace_period then -- if grace period exceeded
108
- if job ~= nil then uv .process_kill (job , 9 ) end -- pkill -9 jobs
108
+ if job ~= nil then uv .process_kill (job ) end -- pkill jobs
109
109
last_execution = current_time -- update time
110
110
end
111
111
end ,
@@ -116,7 +116,7 @@ M.setup = function(ctx)
116
116
desc = " Kill all markmap jobs before closing nvim" ,
117
117
group = augroup (" markmap_kill_pre_exit_nvim" , { clear = true }),
118
118
callback = function ()
119
- if job ~= nil then uv .process_kill (job , 9 ) end -- kill -9 jobs
119
+ if job ~= nil then uv .process_kill (job ) end -- kill jobs
120
120
end ,
121
121
})
122
122
end
0 commit comments