From 18467a55b527358613589ed087c5a308fb37b898 Mon Sep 17 00:00:00 2001 From: w0rp Date: Fri, 19 May 2017 15:23:00 +0100 Subject: [PATCH] Don't modify files when fixing doesn't change anything. --- autoload/ale/fix.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim index a674e75..9fe9956 100644 --- a/autoload/ale/fix.vim +++ b/autoload/ale/fix.vim @@ -26,6 +26,11 @@ function! ale#fix#ApplyQueuedFixes() abort return endif + if l:data.lines_before == l:data.output + " Don't modify the buffer if nothing has changed. + return + endif + call setline(1, l:data.output) let l:start_line = len(l:data.output) + 1