Browse Source

Merge pull request #46280 from floppyhammer/AdjustCompletionPanelPosition

Improve Completion Panel Position in Shader Editor
Rémi Verschelde 4 năm trước cách đây
mục cha
commit
7e86b4c0e4
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
scene/gui/text_edit.cpp

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