summaryrefslogtreecommitdiffstats
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <red@kyoko>2015-05-01 23:20:41 -0300
committerJuan Linietsky <red@kyoko>2015-05-01 23:20:41 -0300
commitdda60296d81edaabfdb56f47a2c949b5dad283fb (patch)
treeb41e31cc4620689a1e91adf852d0926fc600607a /scene/gui/text_edit.cpp
parentfb8b740fcb50dc38526b458af096b72d1303d3e5 (diff)
parent61e90385f6cbeebb8d3d03c33078802c2fa11eda (diff)
downloadredot-engine-dda60296d81edaabfdb56f47a2c949b5dad283fb.tar.gz
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index b26b55f076..1e82432165 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -26,16 +26,6 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-/*****f********************************************/
-/* text_edit.cpp */
-/*************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/*************************************************/
-/* Source code within this file is: */
-/* (c) 2007-2010 Juan Linietsky, Ariel Manzur */
-/* All Rights Reserved. */
-/*************************************************/
#include "text_edit.h"
#include "os/keyboard.h"
@@ -1562,7 +1552,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
case KEY_HOME:
case KEY_END:
// ignore arrows if any modifiers are held (shift = selecting, others may be used for editor hotkeys)
- if (k.mod.command || k.mod.shift || k.mod.alt || k.mod.command)
+ if (k.mod.command || k.mod.shift || k.mod.alt)
break;
unselect=true;
break;
@@ -2596,9 +2586,9 @@ Control::CursorShape TextEdit::get_cursor_shape(const Point2& p_pos) const {
void TextEdit::set_text(String p_text){
setting_text=true;
- _clear();
+ clear();
_insert_text_at_cursor(p_text);
-
+ clear_undo_history();
cursor.column=0;
cursor.line=0;
cursor.x_ofs=0;