palantir / palantir-java-format

A modern, lambda-friendly, 120 character Java formatter.
Apache License 2.0
403 stars 43 forks source link

Formatter is run when IntelliJ loses focus and file is unchanged #1092

Open emmercm opened 1 month ago

emmercm commented 1 month ago

What happened?

Starting with IntelliJ v2024.1.2 (this didn't happen with v2024.1.1), when my IntelliJ window loses focus (i.e. due to alt-tab) this plugin is running on files that haven't changed. This causes the files to be re-saved, frequently giving me a dialog box that disk and in-memory changes are conflicting even though they aren't.

In case it matters, I'm on a MacBook Pro M2 running macOS Sonoma v14.4.1.

What did you want to happen?

The plugin should not run when IntelliJ loses focus and no files have been changed.

jamesmazur commented 1 month ago

I'm also having this problem.

jamesmazur commented 1 month ago

It appears not to be an issue in 2.44.0, but is an issue in 2.47.0.