Kaynağa Gözat

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 7 yıl önce
ebeveyn
işleme
78442e02c6
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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 (' ');
 					}