Skip to content

Commit ea78f5c

Browse files
update callbag to 09ff9228257
1 parent 7770b7d commit ea78f5c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

autoload/lsp/callbag.vim

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
" https://github.com/prabirshrestha/callbag.vim#9108df10d721c04a8908a391dde14aeabacc422d
1+
" https://github.com/prabirshrestha/callbag.vim#09ff9228257f5e8c68910fd9721c95f9d4fb6763
22
" :CallbagEmbed path=autoload/lsp/callbag.vim namespace=lsp#callbag
33

44
let s:undefined_token = '__callbag_undefined__'
@@ -1315,21 +1315,20 @@ endfunction
13151315

13161316
function! s:shareTalkbackCallback(data, sink, t, d) abort
13171317
if a:t == 2
1318-
let l:i = -1
1319-
let l:found = 0
1320-
for l:S in a:data['sinks']
1321-
let l:i += 1
1322-
if l:S == a:sink
1318+
let l:i = 0
1319+
while l:i < len(a:data['sinks'])
1320+
if a:data['sinks'][l:i] == a:sink
13231321
let l:found = 1
13241322
break
13251323
endif
1326-
endfor
1324+
let l:i += 1
1325+
endwhile
13271326

13281327
if l:found
13291328
call remove(a:data['sinks'], l:i)
13301329
endif
13311330

1332-
if !empty(a:data['sinks'])
1331+
if empty(a:data['sinks'])
13331332
call a:data['sourceTalkback'](2, lsp#callbag#undefined())
13341333
endif
13351334
else

0 commit comments

Comments
 (0)