From f2c7a949f0f912bee185183e1dc0638f9ba13236 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 10 Jun 2018 11:55:03 +0200 Subject: [PATCH] package.json files are no longer style formatted on save. These files are style formatted by for instance npm install, and additional style formatting would lead to unwanted commit changes --- src/source.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/source.cc b/src/source.cc index 4f005a9..e47c961 100644 --- a/src/source.cc +++ b/src/source.cc @@ -378,7 +378,7 @@ bool Source::View::save() { if(Config::get().source.cleanup_whitespace_characters) cleanup_whitespace_characters(); - if(format_style) { + if(format_style && file_path.filename()!="package.json") { if(Config::get().source.format_style_on_save) format_style(true); else if(Config::get().source.format_style_on_save_if_style_file_found)