Skip to content

Commit c06a171

Browse files
committed
Revert "Performance: Use nvim_buf_set_lines for neovim"
This reverts commit 7a66142.
1 parent 7505d5b commit c06a171

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

autoload/rustfmt.vim

+1-8
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,7 @@ function! s:RunRustfmt(command, tmpname, from_writepre)
157157
endif
158158

159159
call s:DeleteLines(len(l:content), line('$'))
160-
if has('nvim') && exists('*nvim_buf_set_lines')
161-
" setline() gets called for every item on the array,
162-
" this results on the neovim buffer callbacks being called n times,
163-
" using nvim_buf_set_lines() makes the change in one call.
164-
call nvim_buf_set_lines(0, 0, -1, v:true, l:content)
165-
else
166-
call setline(1, l:content)
167-
endif
160+
call setline(1, l:content)
168161

169162
" only clear location list if it was previously filled to prevent
170163
" clobbering other additions

0 commit comments

Comments
 (0)