From b946207e91cf8a0cef0a0b12c4d9ee7a18bcac3b Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Wed, 10 Jul 2024 07:56:23 -0700 Subject: [PATCH] Tweak previous --- Asm65/Formatter.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Asm65/Formatter.cs b/Asm65/Formatter.cs index a2b41da..3734d73 100644 --- a/Asm65/Formatter.cs +++ b/Asm65/Formatter.cs @@ -119,7 +119,7 @@ namespace Asm65 { // /// Character position at which operands wrap; 0 == default. - public int OperandWrapLen { get; set; } = 0; + public int OperandWrapLen { get; set; } = DEFAULT_OPERAND_WRAP_LEN; /// Add spaces between bytes in the Bytes column? public bool SpacesBetweenBytes { get; set; } = false; // "20edfd" vs. "20 ed fd" @@ -569,8 +569,7 @@ namespace Asm65 { /// Point at which to wrap long operands, such as strings and dense hex. /// public int OperandWrapLen { - get { return mFormatConfig.OperandWrapLen == 0 ? - DEFAULT_OPERAND_WRAP_LEN : mFormatConfig.OperandWrapLen; } + get { return mFormatConfig.OperandWrapLen; } } @@ -592,6 +591,9 @@ namespace Asm65 { } else { mFullLineCommentDelimiterPlus = mFormatConfig.FullLineCommentDelimiterBase; } + if (config.OperandWrapLen <= 0) { + config.OperandWrapLen = DEFAULT_OPERAND_WRAP_LEN; + } // Prep the static parts of the hex dump buffer. mHexDumpBuffer = new char[73];