소스 검색

Fixed mouse click issue

Tig 9 달 전
부모
커밋
73ea9ec867
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      Terminal.Gui/Views/HexView.cs

+ 3 - 3
Terminal.Gui/Views/HexView.cs

@@ -349,7 +349,7 @@ public class HexView : View, IDesignable
 
         if (me.Flags == MouseFlags.WheeledDown)
         {
-            DisplayStart = Math.Min (DisplayStart + BytesPerLine, _source.Length);
+            DisplayStart = Math.Min (DisplayStart + BytesPerLine, GetEditedSize());
 
             return true;
         }
@@ -392,11 +392,11 @@ public class HexView : View, IDesignable
 
         if (clickIsOnLeftSide)
         {
-            Address = Math.Min (lineStart + me.Position.X - blocksRightOffset, _source.Length - 1);
+            Address = Math.Min (lineStart + me.Position.X - blocksRightOffset, GetEditedSize ());
         }
         else
         {
-            Address = Math.Min (lineStart + item, _source.Length - 1);
+            Address = Math.Min (lineStart + item, GetEditedSize ());
         }
 
         if (me.Flags == MouseFlags.Button1DoubleClicked)