codefori / vscode-ibmi

🌍 IBM i development extension for VS Code
https://codefori.github.io/docs/#/
MIT License
264 stars 91 forks source link

Fix clearing of multiple diagnostics #2085

Closed SanjulaGanepola closed 1 month ago

SanjulaGanepola commented 1 month ago

Changes

Fixes #2084

With this PR, whenever the Clear Diagnostic on Edit setting is enabled and a text document is changed, all (instead of just the first one) diagnostics are cleared when the diagnostics range contains the text document's change range.

How to test this PR

  1. Enable the Clear Diagnostic on Edit setting
  2. Git clone ibmi-company_system
  3. Create an error on line 7 (refer to the linked issue)
  4. Compile the file and observe 2 diagnostics in this range.
  5. Fix the error and the 2 diagnostics should be cleared.

Checklist