Merge pull request #46280 from floppyhammer/AdjustCompletionPanelPosition

Improve Completion Panel Position in Shader Editor
This commit is contained in:
Rémi Verschelde 2021-03-21 00:17:35 +01:00 committed by GitHub
commit 7e86b4c0e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1557,7 +1557,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 {