sourcegraph / jetbrains

Apache License 2.0
79 stars 25 forks source link

Fix incorrect cross-project event propagation #2662

Closed pkukielka closed 1 week ago

pkukielka commented 1 week ago

Changes

Due to incorrect implementation of event listeners, if more than one project was open, events like caret change were propagated between editors. This PR fixes it.

Test plan

Test separately with four different options ([opened file | active file | caret position | selected text]):

  1. Open two projects in IntelliJ.
  2. Change [opened file | active file | caret position | selected text] for the first project
  3. Change [opened file | active file | caret position | selected text] for the second project
  4. Files set as context in the Cody chat should be different and match files activated on the previous steps.