asyncrun.vim icon indicating copy to clipboard operation
asyncrun.vim copied to clipboard

add AsyncReset

Open yehuohan opened this issue 2 years ago • 0 comments

Awesome plugin! We all dislike to run terrible code, but there will still be some case like #204 and we have to restart (neo)vim instance. So I think it's great to have an AsyncReset command to reset internal state forcely and ignore the crashed process directly.

@skywind3000 Are you willing to merge this PR to provide a reset command, which may have some corner negetive effect though (e.g. The crashed progress is allocating memory crazily).

Or could you give some comments on the function asyncrun#reset below, which just reset two script variable forcely?

function! asyncrun#reset()
	let s:async_state = 0
	if exists('s:async_job')
		let s:async_job = 0
	endif
endfunc

yehuohan avatar Jul 31 '22 04:07 yehuohan