You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #106919 from kitbdev/fix-codeedit-hover-word-lookup
Fix CodeEdit hover word lookup
This commit is contained in:
@@ -59,34 +59,6 @@ static _FORCE_INLINE_ char32_t lower_case(char32_t c) {
|
||||
return (is_ascii_upper_case(c) ? (c + ('a' - 'A')) : c);
|
||||
}
|
||||
|
||||
bool select_word(const String &p_s, int p_col, int &r_beg, int &r_end) {
|
||||
const String &s = p_s;
|
||||
int beg = CLAMP(p_col, 0, s.length());
|
||||
int end = beg;
|
||||
|
||||
if (s[beg] > 32 || beg == s.length()) {
|
||||
bool symbol = beg < s.length() && is_symbol(s[beg]);
|
||||
|
||||
while (beg > 0 && s[beg - 1] > 32 && (symbol == is_symbol(s[beg - 1]))) {
|
||||
beg--;
|
||||
}
|
||||
while (end < s.length() && s[end + 1] > 32 && (symbol == is_symbol(s[end + 1]))) {
|
||||
end++;
|
||||
}
|
||||
|
||||
if (end < s.length()) {
|
||||
end += 1;
|
||||
}
|
||||
|
||||
r_beg = beg;
|
||||
r_end = end;
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Error String::parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path, String &r_fragment) const {
|
||||
// Splits the URL into scheme, host, port, path, fragment. Strip credentials when present.
|
||||
String base = *this;
|
||||
|
||||
Reference in New Issue
Block a user