intersystems-community / vscode-objectscript

InterSystems ObjectScript extension for Visual Studio Code
https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO
Other
106 stars 48 forks source link

Improve triggering of `AttemptedEdit` source control action #1380

Closed isc-bsaviano closed 2 months ago

isc-bsaviano commented 2 months ago

This PR fixes a bug reported by an internal developer related to the firing of the AttemptedEdit source control action. The developer reported that after reverting a file in the source control UI (not VS Code) when VS Code refreshed its copy of the file the AttemptedEdit action was incorrectly fired, and then upon the next edit to the file the action was not fired. I determined that this was due to the suppressEditListenerMap that was added to avoid firing the action when the file was reverted by the the source control hook. I fixed this issue by changing the criteria that were checked before firing the action so the map was no longer needed.