From 78442e02c62b483ac569e57f57b9a7b6adedc9b0 Mon Sep 17 00:00:00 2001 From: Dan McCarthy Date: Mon, 9 Jul 2018 22:19:07 -0500 Subject: [PATCH] Fixed HexView Display Offset Bug If there is data to display this line will write a hexadecimal byte as a string. If there is no data it will instead fill the gap with spaces. A hexidecimal byte is represented by two digits (e.g., "9F"). Instead of filling 2 spaces to represent the byte it is filling in three spaces. This is causing the formatting of lines without data to be heavily offset and not lining up with lines that contain data. --- Terminal.Gui/Views/HexView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Views/HexView.cs b/Terminal.Gui/Views/HexView.cs index 905bd6f29..313179268 100644 --- a/Terminal.Gui/Views/HexView.cs +++ b/Terminal.Gui/Views/HexView.cs @@ -167,7 +167,7 @@ namespace Terminal.Gui { else SetAttribute (ColorScheme.Normal); - Driver.AddStr (offset >= n ? " " : string.Format ("{0:x2}", value)); + Driver.AddStr (offset >= n ? " " : string.Format ("{0:x2}", value)); SetAttribute (ColorScheme.Normal); Driver.AddRune (' '); }