diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-11 11:13:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 11:13:12 +0200 |
commit | f7254cf43ce19f23678ea3d17fa94919e50ba85d (patch) | |
tree | d2a39d7b1a6981128ce4602dfe6daed3d0c24a79 /scene | |
parent | 22db30100946678175f188de58a413749256e028 (diff) | |
parent | d8f8a3c606785480b368aec3b9b825eb6e453fe8 (diff) | |
download | redot-engine-f7254cf43ce19f23678ea3d17fa94919e50ba85d.tar.gz |
Merge pull request #38491 from eduardonunesp/input-line-osx-selection
Using the common behaviour when use command+shift on text line for osx
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/line_edit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 8574b05016..bb177ae0e7 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -277,10 +277,14 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { } break; #ifdef APPLE_STYLE_KEYS case (KEY_LEFT): { // Go to start of text - like HOME key. + shift_selection_check_pre(k->get_shift()); set_cursor_position(0); + shift_selection_check_post(k->get_shift()); } break; case (KEY_RIGHT): { // Go to end of text - like END key. + shift_selection_check_pre(k->get_shift()); set_cursor_position(text.length()); + shift_selection_check_post(k->get_shift()); } break; #endif default: { |