瀏覽代碼

Code cleanup

Tig 9 月之前
父節點
當前提交
996b3f0215
共有 1 個文件被更改,包括 3 次插入11 次删除
  1. 3 11
      Terminal.Gui/Views/HexView.cs

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

@@ -349,7 +349,7 @@ public class HexView : View, IDesignable
 
 
         if (me.Flags == MouseFlags.WheeledDown)
         if (me.Flags == MouseFlags.WheeledDown)
         {
         {
-            DisplayStart = Math.Min (DisplayStart + BytesPerLine, GetEditedSize());
+            DisplayStart = Math.Min (DisplayStart + BytesPerLine, GetEditedSize ());
 
 
             return true;
             return true;
         }
         }
@@ -952,16 +952,8 @@ public class HexView : View, IDesignable
             return false;
             return false;
         }
         }
 
 
-        if (direction == NavigationDirection.Forward && _leftSideHasFocus)
-        {
-            _leftSideHasFocus = !_leftSideHasFocus;
-            RedisplayLine (Address);
-            _firstNibble = true;
-
-            return true;
-        }
-
-        if (direction == NavigationDirection.Backward && !_leftSideHasFocus)
+        if ((direction == NavigationDirection.Forward && _leftSideHasFocus)
+            || (direction == NavigationDirection.Backward && !_leftSideHasFocus))
         {
         {
             _leftSideHasFocus = !_leftSideHasFocus;
             _leftSideHasFocus = !_leftSideHasFocus;
             RedisplayLine (Address);
             RedisplayLine (Address);