summaryrefslogtreecommitdiffstats
path: root/servers/text_server.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-09-03 09:54:09 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-09-03 09:54:09 +0300
commit1829bc3663fcda522f89e7a4bb635ac070e70d8a (patch)
tree81e6800bebbf334ca925a09ab03a0ec692a4ad01 /servers/text_server.cpp
parent7c383767a29969b0c3db036742da00ef58b765dd (diff)
downloadredot-engine-1829bc3663fcda522f89e7a4bb635ac070e70d8a.tar.gz
[TextServer] Fix structured text parser for GDScript comments.
Diffstat (limited to 'servers/text_server.cpp')
-rw-r--r--servers/text_server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/text_server.cpp b/servers/text_server.cpp
index 860cc5d75d..fda331d482 100644
--- a/servers/text_server.cpp
+++ b/servers/text_server.cpp
@@ -2071,8 +2071,8 @@ TypedArray<Vector3i> TextServer::parse_structured_text(StructuredTextParser p_pa
if (prev != i) {
ret.push_back(Vector3i(prev, i, TextServer::DIRECTION_AUTO));
}
- prev = i + 1;
- ret.push_back(Vector3i(i, i + 1, TextServer::DIRECTION_LTR));
+ prev = p_text.length();
+ ret.push_back(Vector3i(i, p_text.length(), TextServer::DIRECTION_AUTO));
break;
}
}