Skip to content

Commit 5567e3a

Browse files
authored
Fix issue with cancellation of rename (#5025)
1 parent 8aac4ec commit 5567e3a

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Extension/CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@
1010
* @aleksey-sergey [PR 4893](https://github.com/microsoft/vscode-cpptools/pull/4893)
1111
* Default to the bundled `clang-format` if its version is newer. [#4963](https://github.com/microsoft/vscode-cpptools/issues/4963)
1212
* Include only `lldb-mi` for macOS.
13-
* Enable debugging support on macOS Catalina. [#3829](https://github.com/microsoft/vscode-cpptools/issues/3829)
1413
* Fix visualization of standard library types in lldb. [#1768](https://github.com/microsoft/vscode-cpptools/issues/1768)
14+
* Enable debugging support on macOS Catalina. [#3829](https://github.com/microsoft/vscode-cpptools/issues/3829)
1515

1616
### Bug Fixes
17-
* Fix IntelliSense using too much CPU when switching branches. [#2806](https://github.com/microsoft/vscode-cpptools/issues/2806)
1817
* Fix issue in which the user is not again prompted to use a custom configuration provider if settings files have been deleted. [#2346](https://github.com/microsoft/vscode-cpptools/issues/2346)
18+
* Fix "Unrecognized format of field "msg" in result" on macOS. [#2492](https://github.com/microsoft/vscode-cpptools/issues/2492)
19+
* Fix IntelliSense using too much CPU when switching branches. [#2806](https://github.com/microsoft/vscode-cpptools/issues/2806)
20+
* Fix for timeout on slow terminals while debugging. [#2889](https://github.com/microsoft/vscode-cpptools/issues/2889)
21+
* @Epikem [PR MIEngine#965](https://github.com/microsoft/MIEngine/pull/965)
1922
* Fix non-localized text. [#4481](https://github.com/microsoft/vscode-cpptools/issues/4481), [#4879](https://github.com/microsoft/vscode-cpptools/issues/4879)
2023
* Fix issues with paths containing certain Unicode sequences on Mac. [#4712](https://github.com/microsoft/vscode-cpptools/issues/4712)
2124
* Fix IntelliSense parsing bugs and crashes. [#4717](https://github.com/microsoft/vscode-cpptools/issues/4717), [#4798](https://github.com/microsoft/vscode-cpptools/issues/4798)
2225
* Fix configuration UI disabling `compilerPath` if no default compiler is found. [#4727](https://github.com/microsoft/vscode-cpptools/issues/4727)
2326
* Fix issue with providing custom configurations for files specified using URIs schemes we do not recognize. [#4889](https://github.com/microsoft/vscode-cpptools/issues/4889)
2427
* Fix failure to detect CL.exe if VS Installer files are stored on a drive other than the system drive. [#4929](https://github.com/microsoft/vscode-cpptools/issues/4929)
25-
* Fix "Unrecognized format of field "msg" in result" on macOS. [#2492](https://github.com/microsoft/vscode-cpptools/issues/2492)
26-
* Fix for timeout on slow terminals while debugging. [#2889](https://github.com/microsoft/vscode-cpptools/issues/2889)
27-
* @Epikem [PR MIEngine#965](https://github.com/microsoft/MIEngine/pull/965)
28+
* Fix issue with cancellation of a `Rename` operation causing subsequent `Find All References` and `Rename` operations to fail. [#5022](https://github.com/microsoft/vscode-cpptools/issues/5022)
2829

2930
## Version 0.26.3: January 22, 2020
3031
### Bug Fixes

Extension/src/LanguageServer/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ export class DefaultClient implements Client {
845845
}
846846
referencesRequestPending = true;
847847
workspaceReferences.setResultsCallback((referencesResult: refs.ReferencesResult, doResolve: boolean) => {
848-
if (doResolve && referencesResult === null) {
848+
if (doResolve && referencesResult === null && referencesPendingCancellations.length === 0) {
849849
// The result callback will be called with doResult of true and a null result when the Find All References
850850
// portion of the rename is complete. We complete the promise with an empty edit at this point,
851851
// to cause the progress indicator to be dismissed.
@@ -881,7 +881,7 @@ export class DefaultClient implements Client {
881881
workspaceReferences.closeRenameUI();
882882
}
883883
if (doResolve) {
884-
if (referencesResult.referenceInfos === null || referencesResult.referenceInfos.length === 0) {
884+
if (referencesResult && (referencesResult.referenceInfos === null || referencesResult.referenceInfos.length === 0)) {
885885
vscode.window.showErrorMessage(localize("unable.to.locate.selected.symbol", "A definition for the selected symbol could not be located."));
886886
}
887887
resolve(workspaceEdit);

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
parameters:
77
name: macOS
88
pool:
9-
vmImage: 'macOS-10.13'
9+
vmImage: 'macOS-10.14'
1010

1111
- template: Extension/jobs/build.yml
1212
parameters:

0 commit comments

Comments
 (0)