diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml
index c82fc6520..879323519 100644
--- a/.github/workflows/api-docs.yml
+++ b/.github/workflows/api-docs.yml
@@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v2
- name: Setup .NET Core
- uses: actions/setup-dotnet@v3.0.2
+ uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: 6.0.100
diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml
index 200fe5984..692419b9b 100644
--- a/.github/workflows/dotnet-core.yml
+++ b/.github/workflows/dotnet-core.yml
@@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup .NET Core
- uses: actions/setup-dotnet@v3.0.2
+ uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: 6.0.100
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 44a76c881..8951b7109 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -30,7 +30,7 @@ jobs:
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
- name: Setup dotnet
- uses: actions/setup-dotnet@v3.0.2
+ uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: 6.0.100
diff --git a/Terminal.Gui/Views/Menu.cs b/Terminal.Gui/Views/Menu.cs
index 10754106d..3df94d23a 100644
--- a/Terminal.Gui/Views/Menu.cs
+++ b/Terminal.Gui/Views/Menu.cs
@@ -758,6 +758,7 @@ namespace Terminal.Gui {
return true;
var item = barItems.Children [meY];
if (item == null || !item.IsEnabled ()) disabled = true;
+ if (disabled) return true;
current = meY;
if (item != null && !disabled)
RunSelected ();
@@ -1074,7 +1075,7 @@ namespace Terminal.Gui {
if (i == selected && IsMenuOpen) {
hotColor = i == selected ? ColorScheme.HotFocus : ColorScheme.HotNormal;
normalColor = i == selected ? ColorScheme.Focus : GetNormalColor ();
- } else {
+ } else {
hotColor = ColorScheme.HotNormal;
normalColor = GetNormalColor ();
}
diff --git a/Terminal.Gui/Views/TreeView.cs b/Terminal.Gui/Views/TreeView.cs
index 4f8692d74..aa070d499 100644
--- a/Terminal.Gui/Views/TreeView.cs
+++ b/Terminal.Gui/Views/TreeView.cs
@@ -140,12 +140,12 @@ namespace Terminal.Gui {
///
public MouseFlags? ObjectActivationButton { get; set; } = MouseFlags.Button1DoubleClicked;
-
+
///
/// Delegate for multi colored tree views. Return the to use
/// for each passed object or null to use the default.
///
- public Func ColorGetter {get;set;}
+ public Func ColorGetter { get; set; }
///
/// Secondary selected regions of tree when is true
@@ -227,14 +227,15 @@ namespace Terminal.Gui {
/// Defaults to
///
public CursorVisibility DesiredCursorVisibility {
- get {
+ get {
return MultiSelect ? desiredCursorVisibility : CursorVisibility.Invisible;
}
set {
- desiredCursorVisibility = value;
-
- if (desiredCursorVisibility != value && HasFocus) {
- Application.Driver.SetCursorVisibility (DesiredCursorVisibility);
+ if (desiredCursorVisibility != value) {
+ desiredCursorVisibility = value;
+ if (HasFocus) {
+ Application.Driver.SetCursorVisibility (DesiredCursorVisibility);
+ }
}
}
}
@@ -626,7 +627,7 @@ namespace Terminal.Gui {
///
///
///
- public int? GetObjectRow(T toFind)
+ public int? GetObjectRow (T toFind)
{
var idx = BuildLineMap ().IndexOf (o => o.Model.Equals (toFind));
diff --git a/UnitTests/MenuTests.cs b/UnitTests/MenuTests.cs
index a587a996b..613b3afb5 100644
--- a/UnitTests/MenuTests.cs
+++ b/UnitTests/MenuTests.cs
@@ -1133,8 +1133,8 @@ Edit
string padding (int i)
{
int n = 0;
- while (i > 0){
- n += Menus [i-1].TitleLength + 2;
+ while (i > 0) {
+ n += Menus [i - 1].TitleLength + 2;
i--;
}
return new string (' ', n);
@@ -1153,12 +1153,12 @@ Edit
public string expectedBottomRow (int i) => $"{d.LLCorner}{new String (d.HLine.ToString () [0], Menus [i].Children [0].TitleLength + 3)}{d.LRCorner} \n";
// The fulll expected string for an open sub menu
- public string expectedSubMenuOpen (int i) => ClosedMenuText +
+ public string expectedSubMenuOpen (int i) => ClosedMenuText +
(Menus [i].Children.Length > 0 ?
padding (i) + expectedTopRow (i) +
padding (i) + expectedMenuItemRow (i) +
- padding (i) + expectedBottomRow (i)
- :
+ padding (i) + expectedBottomRow (i)
+ :
"");
public ExpectedMenuBar (MenuBarItem [] menus) : base (menus)
@@ -1481,14 +1481,14 @@ Edit
MenuBarItem [] items = new MenuBarItem [expectedMenu.Menus.Length];
for (var i = 0; i < expectedMenu.Menus.Length; i++) {
- items [i] = new MenuBarItem (expectedMenu.Menus [i].Title, expectedMenu.Menus [i].Children.Length > 0
+ items [i] = new MenuBarItem (expectedMenu.Menus [i].Title, expectedMenu.Menus [i].Children.Length > 0
? new MenuItem [] {
new MenuItem (expectedMenu.Menus [i].Children [0].Title, "", null),
- }
+ }
: Array.Empty