diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2016-03-17 19:37:19 +0000 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2016-03-17 19:37:19 +0000 |
commit | 4cc3fbeaffcffe5fe834b2b2afda18661836f769 (patch) | |
tree | b63681a6553a979f5857fd75ce5022fad971f8ed | |
parent | b0488cacf27cb98c4a0dd58661c83262236e18a0 (diff) |
Fixed highliting with shift and mouse
-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 df272c97a5..59f9ee4a73 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); } |