瀏覽代碼

Merge pull request #110137 from fstxz/fix_edit_script

Fix `ScriptEditor::edit()` not jumping to the first line
Thaddeus Crews 3 周之前
父節點
當前提交
3d63c6b602
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);
 				}
 			}