Skip to content

Fix hasEdits flag's value when updating multiple values in JSONEditingService #243876

Merged
sandy081 merged 1 commit intomicrosoft:mainfrom
acdzh:fix/json-editing-service-has-edits
Mar 19, 2025
Merged

Fix hasEdits flag's value when updating multiple values in JSONEditingService #243876
sandy081 merged 1 commit intomicrosoft:mainfrom
acdzh:fix/json-editing-service-has-edits

Conversation

@acdzh
Copy link
Contributor

@acdzh acdzh commented Mar 18, 2025

Hi @sandy081,

This commit (5bca175#diff-4c16f60ba3ea06c8c7dfd2a525ab8bbd55ebf12a7914855cb0f56bdfc9c3c1e7R53) added support for updating multiple values in the JSONEditingService. The hasEdits flag is used to check whether there are actual changes and whether the JSON needs to be saved.

However, based on the code, it appears that the value of hasEdits only reflects from the last value. Shouldn't hasEdits be true as long as any one of the values actually modifies the JSON, rather than only being true if the last value modifies the JSON?

@acdzh acdzh force-pushed the fix/json-editing-service-has-edits branch from 83a0ec3 to 776a6f0 Compare March 18, 2025 15:28
@acdzh acdzh force-pushed the fix/json-editing-service-has-edits branch from 776a6f0 to f938d0d Compare March 19, 2025 07:00
@sandy081 sandy081 enabled auto-merge (squash) March 19, 2025 07:56
@vs-code-engineering vs-code-engineering bot added this to the March 2025 milestone Mar 19, 2025
@sandy081 sandy081 merged commit 50a588b into microsoft:main Mar 19, 2025
7 checks passed
@acdzh acdzh deleted the fix/json-editing-service-has-edits branch March 21, 2025 03:42
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators May 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants