diff --git a/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCommitter.cs b/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCommitter.cs index 3751ca88b708..fbc28efe0c2f 100644 --- a/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCommitter.cs +++ b/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCommitter.cs @@ -53,15 +53,12 @@ public void Commit(CancellationToken cancellationToken) { _stateMachine.ThreadingContext.ThrowIfNotOnUIThread(); - var clearTrackingSession = ApplyChangesToWorkspace(cancellationToken); + ApplyChangesToWorkspace(cancellationToken); // Clear the state machine so that future updates to the same token work, // and any text changes caused by this update are not interpreted as // potential renames - if (clearTrackingSession) - { - _stateMachine.ClearTrackingSession(); - } + _stateMachine.ClearTrackingSession(); } public async Task RenameSymbolAsync(CancellationToken cancellationToken) @@ -85,7 +82,7 @@ private async Task RenameSymbolWorkerAsync(Cancellati return new RenameTrackingSolutionSet(symbol, solutionWithOriginalName, renamedSolution); } - private bool ApplyChangesToWorkspace(CancellationToken cancellationToken) + private void ApplyChangesToWorkspace(CancellationToken cancellationToken) { _stateMachine.ThreadingContext.ThrowIfNotOnUIThread(); @@ -140,7 +137,7 @@ private bool ApplyChangesToWorkspace(CancellationToken cancellationToken) EditorFeaturesResources.Rename_Symbol, NotificationSeverity.Error); - return true; + return; } // move all changes to final solution based on the workspace's current solution, since the current solution @@ -165,7 +162,6 @@ private bool ApplyChangesToWorkspace(CancellationToken cancellationToken) trackingSessionId); RenameTrackingDismisser.DismissRenameTracking(workspace, changedDocuments); - return true; } private Solution CreateSolutionWithOriginalName(Document document, CancellationToken cancellationToken)