navigation history v1

This commit is contained in:
Matt Parker
2025-10-29 20:15:32 +10:00
parent ea543034f9
commit 45946bce8c
7 changed files with 104 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ using Godot;
using ObservableCollections;
using R3;
using SharpIDE.Application.Features.Analysis;
using SharpIDE.Application.Features.NavigationHistory;
using SharpIDE.Application.Features.SolutionDiscovery;
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
using SharpIDE.Godot.Features.Common;
@@ -27,6 +28,8 @@ public partial class SolutionExplorerPanel : MarginContainer
public SharpIdeSolutionModel SolutionModel { get; set; } = null!;
private Tree _tree = null!;
private TreeItem _rootItem = null!;
[Inject] private readonly IdeNavigationHistoryService _navigationHistoryService = null!;
private enum ClipboardOperation { Cut, Copy }
private (List<IFileOrFolder>, ClipboardOperation)? _itemsOnClipboard;
@@ -101,6 +104,7 @@ public partial class SolutionExplorerPanel : MarginContainer
_tree.QueueRedraw();
});
}
_navigationHistoryService.RecordNavigation(file, fileLinePosition ?? new SharpIdeFileLinePosition(0, 0));
await task.ConfigureAwait(false);
}