cue/format: don't indent fields on same line as lbrace master
Vertical tabs are inserted after struct fields in order to correctly vertically align values via text/tabwriter. A recent CL https://cuelang.org/cl/1170966 made changes to this logic in order to improve indentation of list elements. As part of this change, a field whose value is a binary expression will no longer have a vertical tab inserted. For example, given the following code: x: 1 foo: bar & {baz: 1} The formatter will insert vertical tabs like so: x:<VT>1 foo: bar & {baz:<VT>1} Which means text/tabwriter will output the following: x: 1 foo: bar & {baz: 1} The logic is fixed to now ensure that no vtabs are inserted in a line once an '{' has been written, so that vertical tabs in the above example will now be inserted like this: x:<VT>1 foo: bar & {baz: 1} And the formatted code will now be: x: 1 foo: bar & {baz: 1} In addition, a few typos were fixed and dead code was removed. Fixes #3015 Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Ibee8ffc617324396523b50a4bb30b9cfc8beb28c Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1193515 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>