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