summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorfloppyhammer <tannhauser_chen@outlook.com>2021-02-21 18:52:20 +0800
committerfloppyhammer <tannhauser_chen@outlook.com>2021-02-22 11:08:51 +0800
commite927a9fef031a8990185776d0aeee65ed78552d9 (patch)
tree86169b9631f6582fff36999b4ff0f327a13a8d9a /scene
parentd4d753552495dda0eefcdd69228eb4ed4ddc5447 (diff)
ImproveCompletionPanelPositionInShaderEditor
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 36aa18417d..1dfd8087dc 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 {