Browse Source

Make the logic positive

This is a fun trick. Saying `is true` covers the null check because the left operand must be something that evaluates to a boolean with a value of `true`.
Brandon Thetford 1 year ago
parent
commit
3f3264229f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Terminal.Gui/Application.cs

+ 1 - 1
Terminal.Gui/Application.cs

@@ -1601,7 +1601,7 @@ public static partial class Application
 
 
         bool AdornmentHandledMouseEvent (Adornment? frame)
         bool AdornmentHandledMouseEvent (Adornment? frame)
         {
         {
-            if (frame?.Thickness.Contains (frame.FrameToScreen (), a.MouseEvent.X, a.MouseEvent.Y) ?? false)
+            if (frame?.Thickness.Contains (frame.FrameToScreen (), a.MouseEvent.X, a.MouseEvent.Y) is true)
             {
             {
                 Point boundsPoint = frame.ScreenToBounds (a.MouseEvent.X, a.MouseEvent.Y);
                 Point boundsPoint = frame.ScreenToBounds (a.MouseEvent.X, a.MouseEvent.Y);