Browse Source

Merge pull request #110137 from fstxz/fix_edit_script

Fix `ScriptEditor::edit()` not jumping to the first line
Thaddeus Crews 3 tuần trước cách đây
mục cha
commit
3d63c6b602
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      editor/script/script_editor_plugin.cpp

+ 1 - 1
editor/script/script_editor_plugin.cpp

@@ -2626,7 +2626,7 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
 					se->ensure_focus();
 				}
 
-				if (p_line > 0) {
+				if (p_line >= 0) {
 					se->goto_line(p_line, p_col);
 				}
 			}