fix: don't call modal progress if in write action in validateSync

This commit is contained in:
FalsePattern 2025-03-13 22:12:46 +01:00
parent a9b55ec830
commit 4f9c324af1
Signed by: falsepattern
GPG key ID: E930CDEC50C50E23
2 changed files with 6 additions and 1 deletions

View file

@ -17,6 +17,11 @@ Changelog structure reference:
## [Unreleased]
### Fixed
- Project
- Occasional "AWT events are not allowed inside write action" error coming from LSP
## [22.0.0]
### Added

View file

@ -82,7 +82,7 @@ class ZLSProjectSettingsService(val project: Project): PersistentStateComponent<
}
}
fun validateSync() = if (application.isDispatchThread) {
fun validateSync() = if (application.isDispatchThread && !application.isWriteAccessAllowed) {
runWithModalProgressBlocking(ModalTaskOwner.project(project), ZLSBundle.message("progress.title.validate")) {
validateAsync()
}