From 05e11f6336526e52afa4ccad8e5ad1b1c7b6e875 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 2 Jul 2020 15:29:52 +0300 Subject: [PATCH] vfmt: fix `for x; y; i++ \n {}` --- vlib/v/fmt/fmt.v | 1 + 1 file changed, 1 insertion(+) diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index dd64c80410..1d6b99447c 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -345,6 +345,7 @@ pub fn (mut f Fmt) stmt(node ast.Stmt) { f.expr(it.cond) f.write('; ') f.stmt(it.inc) + f.remove_new_line() f.writeln(' {') f.stmts(it.stmts) f.writeln('}')