diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-04-06 23:04:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-06 23:04:43 +0200 |
commit | a30de0a85f225f59cb822ee76d0c873d8afd597d (patch) | |
tree | 23761dc5e63c239279baaee58e0173074c3d3288 /scene | |
parent | b49925caab99fb49b0d50b0f4696d20fd3f4f1d0 (diff) | |
parent | d51fe99a8b6daa3ec6495a5b3e27b63d752c3783 (diff) |
Merge pull request #8290 from supaiku-o/fix-highlight-typo
Fix highlight typo
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/text_edit.cpp | 22 | ||||
-rw-r--r-- | scene/gui/text_edit.h | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 3b7ad910d6..7a7ce57ef7 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -812,8 +812,8 @@ void TextEdit::_notification(int p_what) { keyword_color = *col; } - if (select_identifiers_enabled && hilighted_word != String()) { - if (hilighted_word == range) { + if (select_identifiers_enabled && highlighted_word != String()) { + if (highlighted_word == range) { underlined = true; } } @@ -1463,9 +1463,9 @@ void TextEdit::_gui_input(const InputEvent &p_gui_input) { int row, col; _get_mouse_pos(Point2i(mb.x, mb.y), row, col); - if (mb.mod.command && hilighted_word != String()) { + if (mb.mod.command && highlighted_word != String()) { - emit_signal("symbol_lookup", hilighted_word, row, col); + emit_signal("symbol_lookup", highlighted_word, row, col); return; } @@ -1608,13 +1608,13 @@ void TextEdit::_gui_input(const InputEvent &p_gui_input) { if (mm.mod.command && mm.button_mask == 0) { String new_word = get_word_at_pos(Vector2(mm.x, mm.y)); - if (new_word != hilighted_word) { - hilighted_word = new_word; + if (new_word != highlighted_word) { + highlighted_word = new_word; update(); } } else { - if (hilighted_word != String()) { - hilighted_word = String(); + if (highlighted_word != String()) { + highlighted_word = String(); update(); } } @@ -1655,11 +1655,11 @@ void TextEdit::_gui_input(const InputEvent &p_gui_input) { if (k.pressed) { - hilighted_word = get_word_at_pos(get_local_mouse_pos()); + highlighted_word = get_word_at_pos(get_local_mouse_pos()); update(); } else { - hilighted_word = String(); + highlighted_word = String(); update(); } } @@ -3174,7 +3174,7 @@ void TextEdit::insert_text_at_cursor(const String &p_text) { } Control::CursorShape TextEdit::get_cursor_shape(const Point2 &p_pos) const { - if (hilighted_word != String()) + if (highlighted_word != String()) return CURSOR_POINTING_HAND; int gutter = cache.style_normal->get_margin(MARGIN_LEFT) + cache.line_number_w + cache.breakpoint_gutter_width; diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index e38d484b0d..4032cf2533 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -252,7 +252,7 @@ class TextEdit : public Control { bool raised_from_completion; - String hilighted_word; + String highlighted_word; uint64_t last_dblclk; |