File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ function! sy#start(...) abort
1010 return
1111 endif
1212
13+ if g: signify_detecting > 50
14+ call sy#verbose (' Too many detection jobs running, deferring detection' )
15+ return
16+ endif
17+
1318 let bufnr = a: 0 && has_key (a: 1 , ' bufnr' ) ? a: 1 .bufnr : bufnr (' ' )
1419 let sy = getbufvar (bufnr , ' sy' )
1520
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ function! sy#repo#detect(bufnr) abort
77 let sy = getbufvar (a: bufnr , ' sy' )
88 for vcs in s: vcs_list
99 let sy .detecting += 1
10+ let g: signify_detecting += 1
1011 call sy#repo#get_diff (a: bufnr , vcs, function (' sy#sign#set_signs' ))
1112 endfor
1213endfunction
@@ -130,6 +131,7 @@ function! s:handle_diff(options, exitval) abort
130131 call sy#verbose (printf (' Signs already got updated by %s.' , sy .updated_by), a: options .vcs)
131132 return
132133 elseif empty (sy .vcs)
134+ let g: signify_detecting -= 1
133135 let sy .detecting -= 1
134136 endif
135137
Original file line number Diff line number Diff line change 88
99let g: loaded_signify = 1
1010let g: signify_locked = 0
11+ let g: signify_detecting = 0
1112
1213" Commands {{{1
1314command ! -nargs =0 - bar SignifyList call sy#debug#list_active_buffers ()
You can’t perform that action at this time.
0 commit comments