From ce1215f507254365e2ce51aff820884182970ee6 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 27 Apr 2020 23:20:11 +0300 Subject: [PATCH] vfmt: set Preferences.is_fmt flag (bugfix) --- cmd/tools/vfmt.v | 1 + cmd/v/v.v | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/vfmt.v b/cmd/tools/vfmt.v index d7de886fda..e345883ffc 100644 --- a/cmd/tools/vfmt.v +++ b/cmd/tools/vfmt.v @@ -142,6 +142,7 @@ fn main() { fn (foptions &FormatOptions) format_file(file string) { prefs := pref.new_preferences() + prefs.is_fmt = util.is_fmt() if foptions.is_verbose { eprintln('vfmt2 running fmt.fmt over file: $file') } diff --git a/cmd/v/v.v b/cmd/v/v.v index bcc60f3b22..8d99096370 100644 --- a/cmd/v/v.v +++ b/cmd/v/v.v @@ -112,7 +112,6 @@ fn parse_args(args []string) (&pref.Preferences, string) { mut res := &pref.Preferences{} mut command := '' mut command_pos := 0 - res.is_fmt = util.is_fmt() // for i, arg in args { for i := 0; i < args.len; i++ { arg := args[i]