mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-05 23:07:42 -05:00
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;
|
||||
|
||||
@@ -791,8 +791,6 @@ _FORCE_INLINE_ String ETRN(const String &p_text, const String &p_text_plural, in
|
||||
return p_text_plural;
|
||||
}
|
||||
|
||||
bool select_word(const String &p_s, int p_col, int &r_beg, int &r_end);
|
||||
|
||||
template <typename... P>
|
||||
_FORCE_INLINE_ Vector<String> sarray(P... p_args) {
|
||||
return Vector<String>({ String(p_args)... });
|
||||
|
||||
Reference in New Issue
Block a user