From a4b3c40e8c8eb40625ae6b7a105f50a97527a7a8 Mon Sep 17 00:00:00 2001 From: Chiel ten Brinke Date: Fri, 20 Oct 2017 14:45:24 +0200 Subject: [PATCH] Solve #128. --- plugin/autoformat.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/autoformat.vim b/plugin/autoformat.vim index fb4283e..289ff53 100644 --- a/plugin/autoformat.vim +++ b/plugin/autoformat.vim @@ -228,7 +228,8 @@ else: for eol in possible_eols: lines = [splitline for line in lines for splitline in line.split(eol)] - vim.current.buffer[:] = lines + if vim.current.buffer[:] != lines: + vim.current.buffer[:] = lines EOF return 0 @@ -287,7 +288,8 @@ else: for eol in possible_eols: lines = [splitline for line in lines for splitline in line.split(eol)] - vim.current.buffer[:] = lines + if vim.current.buffer[:] != lines: + vim.current.buffer[:] = lines vim.command('return 0') EOF endfunction