浏览代码

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 年之前
父节点
当前提交
78442e02c6
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 (' ');
 					}