ImproveCompletionPanelPositionInShaderEditor

This commit is contained in:
floppyhammer 2021-02-21 18:52:20 +08:00
parent d4d7535524
commit e927a9fef0

View file

@ -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 {