RegExp: fix balloon resizing on typing enter in the sample field (IDEA-254217)

GitOrigin-RevId: d6abcafdb487fe265540c49442f8ce6fa254f456
This commit is contained in:
Bas Leijdekkers
2020-11-03 21:08:17 +01:00
committed by intellij-monorepo-bot
parent d32e27ad99
commit d1c88e868f

View File

@@ -27,6 +27,8 @@ import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.fileTypes.PlainTextFileType;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.popup.Balloon;
import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.NlsContexts;
@@ -250,6 +252,11 @@ public final class CheckRegExpForm {
}
private void update() {
// triggers resizing of balloon when necessary
myRootPanel.revalidate();
Balloon balloon = JBPopupFactory.getInstance().getParentBalloonFor(myRootPanel);
if (balloon != null && !balloon.isDisposed()) balloon.revalidate();
updater.cancelAllRequests();
if (!updater.isDisposed()) {
updater.addRequest(() -> {