diff options
Diffstat (limited to 'cmd/krino/undo.go')
| -rw-r--r-- | cmd/krino/undo.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cmd/krino/undo.go b/cmd/krino/undo.go index 4c71fdd..ecab2f3 100644 --- a/cmd/krino/undo.go +++ b/cmd/krino/undo.go @@ -404,9 +404,17 @@ func reviewUndoPerFile(in io.Reader, out io.Writer, files []engine.UndoFile, p p approved = map[int]bool{} yesRest := false for i, f := range files { - fmt.Fprintf(out, "\n[%d/%d] %s/%s\n", i+1, len(files), display(f.Dir), display(f.File)) + // Heading and steps wrap past the action column, so a long name or + // path cannot pass for a step line (plan 11 review L4). + width := widthPolicy(out) + fmt.Fprintln(out) + for _, l := range wrapped("", fmt.Sprintf("[%d/%d] %s/%s", i+1, len(files), display(f.Dir), display(f.File)), 7+undoStepWidth+2, width, plainText) { + fmt.Fprintln(out, l) + } for _, s := range f.Steps { - fmt.Fprintf(out, " %s\n", undoActionCell(s)) + for _, l := range wrapped(" ", undoActionCell(s), 7+undoStepWidth+2, width, plainText) { + fmt.Fprintln(out, l) + } } if f.Refused != "" { fmt.Fprintf(out, " refused: %s\n", display(f.Refused)) |
