From 7c0219efccee6a5929274b07a594e832fd5d596a Mon Sep 17 00:00:00 2001 From: w0rp Date: Thu, 3 May 2018 22:14:20 +0100 Subject: #1503 Call setline() after `d`, in case there are folds at the end of the file --- autoload/ale/fix.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'autoload') diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim index 03855ef8..51df1458 100644 --- a/autoload/ale/fix.vim +++ b/autoload/ale/fix.vim @@ -28,8 +28,6 @@ function! ale#fix#ApplyQueuedFixes() abort call remove(g:ale_fix_buffer_data, l:buffer) if l:data.changes_made - call setline(1, l:data.output) - let l:start_line = len(l:data.output) + 1 let l:end_line = len(l:data.lines_before) @@ -39,6 +37,8 @@ function! ale#fix#ApplyQueuedFixes() abort call winrestview(l:save) endif + call setline(1, l:data.output) + if l:data.should_save if empty(&buftype) noautocmd :w! -- cgit v1.2.3