diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2016-12-23 15:52:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-23 15:52:21 +0100 |
commit | 2b847d2a2e0a3ca73f7aa270c0b6d4284fe526af (patch) | |
tree | 5e3a545517994d79eacb3d35186775ec274eb6a9 | |
parent | f8e6cdd89dec432ef945084961da71cbffd6bafe (diff) | |
parent | d1cf29fe9936b8a433601efa891453dcbb702227 (diff) |
Merge pull request #7330 from darkfoxprime/#7326-fix-whole-word-search
Fix search to find "whole" words at end of line
-rw-r--r-- | scene/gui/text_edit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index c585fff2a6..46d4144a85 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3783,7 +3783,7 @@ int TextEdit::_get_column_pos_of_word(const String &p_key, const String &p_searc if (col > 0 && _is_text_char(p_search[col-1])) { col = -1; - } else if (_is_text_char(p_search[col+p_key.length()])) { + } else if ((col + p_key.length()) < p_search.length() && _is_text_char(p_search[col+p_key.length()])) { col = -1; } } |