summaryrefslogtreecommitdiffstats
path: root/scene/gui/code_edit.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-03-11 14:02:30 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-03-11 14:02:30 +0100
commit1bbdbbaada71655f6065562185937f6628b020f2 (patch)
tree55e5e35c0f72cac20c15ecdf1e9d5e87214bd579 /scene/gui/code_edit.cpp
parent22dcfa14e31fa19c77a202dae6213194a2e0abde (diff)
parent8c36282febcde3a417d8ed3a8f5996c285829abd (diff)
downloadredot-engine-1bbdbbaada71655f6065562185937f6628b020f2.tar.gz
Merge pull request #89242 from RafaelRain18/master
Fix region section not ignoring #region and #endregion when in a string
Diffstat (limited to 'scene/gui/code_edit.cpp')
-rw-r--r--scene/gui/code_edit.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index b8af4c3f79..f7eae2b772 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -1861,6 +1861,9 @@ bool CodeEdit::is_line_code_region_start(int p_line) const {
if (code_region_start_string.is_empty()) {
return false;
}
+ if (is_in_string(p_line) != -1) {
+ return false;
+ }
return get_line(p_line).strip_edges().begins_with(code_region_start_string);
}
@@ -1869,6 +1872,9 @@ bool CodeEdit::is_line_code_region_end(int p_line) const {
if (code_region_start_string.is_empty()) {
return false;
}
+ if (is_in_string(p_line) != -1) {
+ return false;
+ }
return get_line(p_line).strip_edges().begins_with(code_region_end_string);
}