summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-19 15:23:00 +0100
committerw0rp <devw0rp@gmail.com>2017-05-20 19:02:36 +0100
commit18467a55b527358613589ed087c5a308fb37b898 (patch)
treed10599f3e863355119d10f4b7a0e0043dbc28eeb /autoload
parente6b132c915f11e7ff4962f14bfeba1bd77cd5f9f (diff)
downloadale-18467a55b527358613589ed087c5a308fb37b898.zip
Don't modify files when fixing doesn't change anything.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fix.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim
index a674e75c..9fe99563 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