Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Save): Refresh without file-watcher #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ArturitoGit
Copy link

syncRefresh() was used until now, but this method relies on a file-watcher.
As a consequence, the following statement (reloadFromDisk), would be played
before the file can be marked as dirty, and potentially be wrong.

This creates the following bug :
If one opens a file, modifies it so that a diagnostic message appears, and then saves it,
then the diagnostic message is also going to disappear, because Intellij is going to
"reload" a file from its internal cache, and is not going to take the change into account.

Use refreshWithoutFileWatcher() instead, to make sure that the file is refreshed before
reloadFromDisk() is called.

asyncRefresh() was used until now,
but this method relies on a file-watcher.
As a consequence, the following statement
(reloadFromDisk) happens before the file
can be marked as dirty, which makes the first
call to reloadFromDisk() use the idea cache.

Use refreshWithoutFileWatcher() instead, to
make sure that the file is refreshed before
the next call to reloadFromDisk().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant