From 56cc0476ebf7ddf8c97c04ac64e31cac4feb38a4 Mon Sep 17 00:00:00 2001 From: Tom McKeesick Date: Fri, 29 Nov 2024 18:17:38 +1100 Subject: [PATCH] resolve merge issues --- src/pokesay/print.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pokesay/print.go b/src/pokesay/print.go index 420fffa..96be656 100644 --- a/src/pokesay/print.go +++ b/src/pokesay/print.go @@ -156,21 +156,21 @@ func printSpeechBubbleLine(boxChars *BoxChars, line string, args Args) { } lineLen := UnicodeStringLength(line) - if lineLen <= width { + if lineLen <= args.Width { // print the line with padding, the most common case fmt.Printf( "%s %s%s%s %s\n", - boxCharacters.VerticalEdge, // left-hand side of the bubble - line, resetColourANSI, // the text - strings.Repeat(" ", width-lineLen), // padding - boxCharacters.VerticalEdge, // right-hand side of the bubble + boxChars.VerticalEdge, // left-hand side of the bubble + line, resetColourANSI, // the text + strings.Repeat(" ", args.Width-lineLen), // padding + boxChars.VerticalEdge, // right-hand side of the bubble ) - } else if lineLen > width { + } else if lineLen > args.Width { // print the line without padding or right-hand side of the bubble if the line is too long fmt.Printf( "%s %s%s\n", - boxCharacters.VerticalEdge, // left-hand side of the bubble - line, resetColourANSI, // the text + boxChars.VerticalEdge, // left-hand side of the bubble + line, resetColourANSI, // the text ) } }