diff options
| author | Fabio Alessandrelli | 2018-01-12 02:53:03 +0100 |
|---|---|---|
| committer | Fabio Alessandrelli | 2018-02-23 13:01:28 +0100 |
| commit | e15fe296bdbcbab038fe0a918a3cb739826e8271 (patch) | |
| tree | 41bad6dfea1638987f5585421932f870e5bd49cb /scene/gui/line_edit.cpp | |
| parent | e3eb6869068edb2617a311f89e93b92a9aa5b905 (diff) | |
| download | godot-e15fe296bdbcbab038fe0a918a3cb739826e8271.tar.gz godot-e15fe296bdbcbab038fe0a918a3cb739826e8271.tar.zst godot-e15fe296bdbcbab038fe0a918a3cb739826e8271.zip | |
Diffstat (limited to 'scene/gui/line_edit.cpp')
| -rw-r--r-- | scene/gui/line_edit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 03dc6686b..5c0e8fefc 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -373,12 +373,14 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { case KEY_UP: { shift_selection_check_pre(k->get_shift()); + if (get_cursor_position() == 0) handled = false; set_cursor_position(0); shift_selection_check_post(k->get_shift()); } break; case KEY_DOWN: { shift_selection_check_pre(k->get_shift()); + if (get_cursor_position() == text.length()) handled = false; set_cursor_position(text.length()); shift_selection_check_post(k->get_shift()); } break; |
