From e927a9fef031a8990185776d0aeee65ed78552d9 Mon Sep 17 00:00:00 2001 From: floppyhammer Date: Sun, 21 Feb 2021 18:52:20 +0800 Subject: [PATCH] ImproveCompletionPanelPositionInShaderEditor --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 36aa18417da..1dfd8087dc5 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1566,7 +1566,7 @@ void TextEdit::_notification(int p_what) { completion_rect.position.x = rect_left_border_x; } - if (cursor_pos.y + row_height + total_height > get_size().height) { + if (cursor_pos.y + row_height + total_height > get_size().height && cursor_pos.y > total_height) { // Completion panel above the cursor line completion_rect.position.y = cursor_pos.y - total_height; } else {