Skip to content

Commit 0fe4225

Browse files
committed
UI: Fix editor markup on map fields that look like keywords
1 parent 233a3a4 commit 0fe4225

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
Fix over scroll issue with line number widget
1111
Fix screen dump invalid file name for online files
1212
Fix file manager .bas file case sensitivity
13+
Fix editor markup on map fields that look like keywords
1314
Implemented editor F2 command to display online help
1415
Implemented calling IMAGE with another image variable
1516

src/ui/textedit.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,11 @@ uint32_t TextEditInput::getHash(const char *str, int offs, int &count) {
11301130
for (count = 0; count < keyword_max_len; count++) {
11311131
char ch = str[offs + count];
11321132
if (!isalpha(ch) && ch != '_') {
1133+
// non keyword character
1134+
while (isalnum(ch) || ch == '.' || ch == '_') {
1135+
// skip any program variable characters
1136+
ch = str[offs + count++];
1137+
}
11331138
break;
11341139
}
11351140
result += tolower(str[offs + count]);

0 commit comments

Comments
 (0)