aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/line_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/line_edit.cpp')
-rw-r--r--scene/gui/line_edit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index e822cfef1..a77a40327 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -212,7 +212,7 @@ void LineEdit::_input_event(InputEvent p_event) {
emit_signal( "text_entered",text );
// notify to hide soft keyboard
- notification(NOTIFICATION_FOCUS_EXIT);
+ notification(NOTIFICATION_FOCUS_EXIT);
return;
} break;
@@ -677,6 +677,7 @@ void LineEdit::selection_delete() {
undo_text = text;
text.erase(selection.begin,selection.end-selection.begin);
+ cursor_pos-=CLAMP( cursor_pos-selection.begin, 0, selection.end-selection.begin);
if (cursor_pos>=text.length()) {