Sample project to reproduce an issue where textDocument/didOpen
triggers for
files returned from "Find References", but no corresponding
textDocument/didClose
triggers. The didClose
event does not trigger even
after opening the file from the "References" pane and then closing it.
- Run
npm install
- Create a new workspace folder with some text files:
mkdir /tmp/test-workspace
echo "File 1" > /tmp/test-workspace/file1.txt
echo "File 2" > /tmp/test-workspace/file2.txt
echo "File 3" > /tmp/test-workspace/file3.txt
- Run debug configuration "Launch Client"
- Open the workspace folder created in step #2.
- Open file
file1.txt
- Right-click the word
File
infile1.txt
and "Find References". Notice the errors fromfile2.txt
in the "Problems" pane - Opening
file2.txt
and then closing it will not remove the published diagnostics, nor does clearing it from the References results pane. - Closing the original
file1.txt
will clear the diagnostics for this file.
See bug video here: