diff options
| author | Paulb23 | 2016-03-17 19:37:19 +0000 |
|---|---|---|
| committer | Rémi Verschelde | 2016-04-02 22:11:30 +0200 |
| commit | 68b7f9d87a06defc484daee04d8a85e016ef8279 (patch) | |
| tree | 280711f6b5625dcea51b88c5c49cfe7ae077d073 | |
| parent | 8a78112e5b1f91459c0ac22aded0acd0948fbe9f (diff) | |
| download | godot-68b7f9d87a06defc484daee04d8a85e016ef8279.tar.gz godot-68b7f9d87a06defc484daee04d8a85e016ef8279.tar.zst godot-68b7f9d87a06defc484daee04d8a85e016ef8279.zip | |
Fixed highliting with shift and mouse
(cherry picked from commit 4cc3fbeaffcffe5fe834b2b2afda18661836f769)
| -rw-r--r-- | scene/gui/text_edit.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 69d4c13d6..be3792ad7 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -644,10 +644,7 @@ void TextEdit::_notification(int p_what) { Point2 cursor_pos; // get the highlighted words - String highlighted_text; - if (is_selection_active()) { - highlighted_text = get_selection_text(); - } + String highlighted_text = get_selection_text(); for (int i=0;i<visible_rows;i++) { @@ -667,7 +664,7 @@ void TextEdit::_notification(int p_what) { // check if line contains highlighted word int highlighted_text_col = -1; - if (is_selection_active()) { + if (highlighted_text.length() != 0) { highlighted_text_col = _get_column_pos_of_word(highlighted_text, str, 0); } |
