소스 검색

ImproveCompletionPanelPositionInShaderEditor

floppyhammer 4 년 전
부모
커밋
e927a9fef0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
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 {