Browse Source

Code cleanup - CancelEventArgs

Tig 9 months ago
parent
commit
d91d604b88

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

@@ -4,7 +4,7 @@
 public class AdvanceFocusEventArgs : CancelEventArgs<bool>
 public class AdvanceFocusEventArgs : CancelEventArgs<bool>
 {
 {
     /// <summary>Initializes a new instance.</summary>
     /// <summary>Initializes a new instance.</summary>
-    public AdvanceFocusEventArgs (NavigationDirection direction, TabBehavior? behavior)
+    public AdvanceFocusEventArgs (NavigationDirection direction, TabBehavior? behavior) : base (false, false)
     {
     {
         Direction = direction;
         Direction = direction;
         Behavior = behavior;
         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)
             // We can move down lines cleanly (without extending stream)
             Address += bytes;
             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
                  || (bytes <= BytesPerLine * Viewport.Height - BytesPerLine
-                     && _source.Length <= DisplayStart + BytesPerLine * Viewport.Height))
+                     && _source!.Length <= DisplayStart + BytesPerLine * Viewport.Height))
         {
         {
             long p = Address;
             long p = Address;