#1503 Call setline() after d, in case there are folds at the end of the file

This commit is contained in:
w0rp 2018-05-03 22:14:20 +01:00
parent 6495fac820
commit 7c0219efcc
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83

View File

@ -28,8 +28,6 @@ function! ale#fix#ApplyQueuedFixes() abort
call remove(g:ale_fix_buffer_data, l:buffer) call remove(g:ale_fix_buffer_data, l:buffer)
if l:data.changes_made if l:data.changes_made
call setline(1, l:data.output)
let l:start_line = len(l:data.output) + 1 let l:start_line = len(l:data.output) + 1
let l:end_line = len(l:data.lines_before) let l:end_line = len(l:data.lines_before)
@ -39,6 +37,8 @@ function! ale#fix#ApplyQueuedFixes() abort
call winrestview(l:save) call winrestview(l:save)
endif endif
call setline(1, l:data.output)
if l:data.should_save if l:data.should_save
if empty(&buftype) if empty(&buftype)
noautocmd :w! noautocmd :w!