From 5dc2786ab2d050d9c25893ddebf89f0ec35605f7 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 15 Jan 2025 23:14:01 -0500 Subject: [PATCH] Fix popup config 'above/below' being flipped --- .../recaf/ui/control/richtext/suggest/CompletionPopup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/suggest/CompletionPopup.java b/recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/suggest/CompletionPopup.java index 41d2940df..650870641 100644 --- a/recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/suggest/CompletionPopup.java +++ b/recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/suggest/CompletionPopup.java @@ -243,8 +243,8 @@ public void show() { ? lastCaretBounds.getMaxX() : lastCaretBounds.getMinX() - popup.getWidth(); double anchorY = config.getPopupPosition().isAbove() - ? lastCaretBounds.getMaxY() - : lastCaretBounds.getMinY() - popupSize; + ? lastCaretBounds.getMinY() - popupSize + : lastCaretBounds.getMaxY(); // choose other position if the popup is off-screen // if the popup is off-screen, flip the popup to the other side of the caret on that axis