Skip to content

fix(lsp): sync cleared document contents#25

Merged
hongjr03 merged 2 commits into
masterfrom
fix/empty-format
May 18, 2026
Merged

fix(lsp): sync cleared document contents#25
hongjr03 merged 2 commits into
masterfrom
fix/empty-format

Conversation

@hongjr03
Copy link
Copy Markdown
Member

Closes #19.

mem::take(data) clears data before the new text is compared. If the edit clears the file, the computed new text is also empty, so the handler compares empty string to empty string and skips the set_vfs_file_contents(...) function, which leaves analysis with stale file contents.

@hongjr03 hongjr03 merged commit 4838205 into master May 18, 2026
21 of 24 checks passed
@hongjr03 hongjr03 deleted the fix/empty-format branch May 18, 2026 17:05
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.

Formatting an empty file that previously had content causes the original content to reappear

1 participant