Explorar o código

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.
Dan McCarthy %!s(int64=7) %!d(string=hai) anos
pai
achega
78442e02c6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Terminal.Gui/Views/HexView.cs

+ 1 - 1
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 (' ');
 					}