You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Use one-based line numbers for external text editors
This commit is contained in:
@@ -2503,8 +2503,8 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
|
|||||||
if (flags.size()) {
|
if (flags.size()) {
|
||||||
String project_path = ProjectSettings::get_singleton()->get_resource_path();
|
String project_path = ProjectSettings::get_singleton()->get_resource_path();
|
||||||
|
|
||||||
flags = flags.replacen("{line}", itos(p_line > 0 ? p_line : 0));
|
flags = flags.replacen("{line}", itos(MAX(p_line + 1, 1)));
|
||||||
flags = flags.replacen("{col}", itos(p_col));
|
flags = flags.replacen("{col}", itos(p_col + 1));
|
||||||
flags = flags.strip_edges().replace("\\\\", "\\");
|
flags = flags.strip_edges().replace("\\\\", "\\");
|
||||||
|
|
||||||
int from = 0;
|
int from = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user