Skip to content

Commit 77f8240

Browse files
thomasfaingnaertDima Chechetkin
authored andcommitted
Add buffer expression to bufwinnr call (prabirshrestha#545)
1 parent ce995c1 commit 77f8240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/lsp/ui/vim/folding.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function! s:handle_fold_request(server, data) abort
181181
" Set 'foldmethod' back to 'expr', which forces a re-evaluation of
182182
" 'foldexpr'. Only do this if the user hasn't changed 'foldmethod',
183183
" and this is the correct buffer.
184-
let l:current_window = bufwinnr()
184+
let l:current_window = bufwinnr('%')
185185
windo if &l:foldmethod ==# 'expr' && bufnr('%') == l:bufnr | let &l:foldmethod = 'expr' | endif
186186
execute l:current_window . 'wincmd w'
187187
endfunction

0 commit comments

Comments
 (0)