diff --git a/src/SharpIDE.Application/Features/NavigationHistory/IdeNavigationHistoryService.cs b/src/SharpIDE.Application/Features/NavigationHistory/IdeNavigationHistoryService.cs index 5f08817..4ef0f05 100644 --- a/src/SharpIDE.Application/Features/NavigationHistory/IdeNavigationHistoryService.cs +++ b/src/SharpIDE.Application/Features/NavigationHistory/IdeNavigationHistoryService.cs @@ -29,6 +29,13 @@ public class IdeNavigationHistoryService _forwardStack.Clear(); } + public void ClearHistory() + { + _backStack.Clear(); + _forwardStack.Clear(); + _current = null; + } + public void GoBack() { if (!CanGoBack) throw new InvalidOperationException("Cannot go back, no history available."); diff --git a/src/SharpIDE.Godot/Features/Navigation/ForwardBackwardButtonContainer.cs b/src/SharpIDE.Godot/Features/Navigation/ForwardBackwardButtonContainer.cs index c8eff57..82a2afb 100644 --- a/src/SharpIDE.Godot/Features/Navigation/ForwardBackwardButtonContainer.cs +++ b/src/SharpIDE.Godot/Features/Navigation/ForwardBackwardButtonContainer.cs @@ -1,4 +1,5 @@ using Godot; +using R3; using SharpIDE.Application.Features.NavigationHistory; namespace SharpIDE.Godot.Features.Navigation; @@ -14,5 +15,24 @@ public partial class ForwardBackwardButtonContainer : HBoxContainer { _backwardButton = GetNode