소스 검색

Code cleanup - CancelEventArgs

Tig 10 달 전
부모
커밋
d91d604b88
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      Terminal.Gui/View/Navigation/AdvanceFocusEventArgs.cs
  2. 2 2
      Terminal.Gui/Views/HexView.cs

+ 1 - 1
Terminal.Gui/View/Navigation/AdvanceFocusEventArgs.cs

@@ -4,7 +4,7 @@
 public class AdvanceFocusEventArgs : CancelEventArgs<bool>
 {
     /// <summary>Initializes a new instance.</summary>
-    public AdvanceFocusEventArgs (NavigationDirection direction, TabBehavior? behavior)
+    public AdvanceFocusEventArgs (NavigationDirection direction, TabBehavior? behavior) : base (false, false)
     {
         Direction = direction;
         Behavior = behavior;

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

@@ -755,9 +755,9 @@ public class HexView : View, IDesignable
             // We can move down lines cleanly (without extending stream)
             Address += bytes;
         }
-        else if ((bytes == BytesPerLine * Viewport.Height && _source.Length >= DisplayStart + BytesPerLine * Viewport.Height)
+        else if ((bytes == BytesPerLine * Viewport.Height && _source!.Length >= DisplayStart + BytesPerLine * Viewport.Height)
                  || (bytes <= BytesPerLine * Viewport.Height - BytesPerLine
-                     && _source.Length <= DisplayStart + BytesPerLine * Viewport.Height))
+                     && _source!.Length <= DisplayStart + BytesPerLine * Viewport.Height))
         {
             long p = Address;