saros
saros copied to clipboard
Annotations remain in editor after session end if file was open in multiple editors at some point
trafficstars
Saros annotations might not be correctly removed from the local editor after the session ends if the file for the editor was at some point during the session open in multiple editors.
This is due to the annotation store only holding the reference to the most recently opened editor for the file. If a second editor is opened for a file, the first editor reference is dropped. As a result, Saros won't be able to clean up the Saros annotations for the dropped editor.
Suggested Solution Approach
This could be resolved by adjusting the annotation logic to hold the references to all open editors and the range highlighters applied to all editors.