vfmt: set Preferences.is_fmt flag (bugfix)

pull/4627/head
Delyan Angelov 2020-04-27 23:20:11 +03:00
parent 5d073dcce5
commit ce1215f507
2 changed files with 1 additions and 1 deletions

View File

@ -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')
}

View File

@ -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]