vfmt: set Preferences.is_fmt flag (bugfix)
parent
5d073dcce5
commit
ce1215f507
|
@ -142,6 +142,7 @@ fn main() {
|
||||||
|
|
||||||
fn (foptions &FormatOptions) format_file(file string) {
|
fn (foptions &FormatOptions) format_file(file string) {
|
||||||
prefs := pref.new_preferences()
|
prefs := pref.new_preferences()
|
||||||
|
prefs.is_fmt = util.is_fmt()
|
||||||
if foptions.is_verbose {
|
if foptions.is_verbose {
|
||||||
eprintln('vfmt2 running fmt.fmt over file: $file')
|
eprintln('vfmt2 running fmt.fmt over file: $file')
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,6 @@ fn parse_args(args []string) (&pref.Preferences, string) {
|
||||||
mut res := &pref.Preferences{}
|
mut res := &pref.Preferences{}
|
||||||
mut command := ''
|
mut command := ''
|
||||||
mut command_pos := 0
|
mut command_pos := 0
|
||||||
res.is_fmt = util.is_fmt()
|
|
||||||
// for i, arg in args {
|
// for i, arg in args {
|
||||||
for i := 0; i < args.len; i++ {
|
for i := 0; i < args.len; i++ {
|
||||||
arg := args[i]
|
arg := args[i]
|
||||||
|
|
Loading…
Reference in New Issue