summaryrefslogtreecommitdiff
path: root/scene/gui/line_edit.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-09-21 01:43:42 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-09-21 01:43:42 -0300
commit11a5ed508b1cbde61a4d9dd4f469e86e74667623 (patch)
treee4bc1926057d788aeeef3633930bb958eb976d3a /scene/gui/line_edit.cpp
parentc5b905fca82f1437486f2168270c5caa0b4bf104 (diff)
Fixed too many little issues, check the issues closed today.
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 e822cfef13..a77a40327f 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()) {