diff options
author | Juan Linietsky <red@kyoko> | 2015-05-21 15:02:49 -0300 |
---|---|---|
committer | Juan Linietsky <red@kyoko> | 2015-05-21 15:02:49 -0300 |
commit | bb5d46bb113bca3204db7678eb69900f159e8087 (patch) | |
tree | cd34e10d67a196d217559ab8d4973b8f5bc4ccde /scene/gui/text_edit.cpp | |
parent | 4b8745ad63409cf14b02735981ee35d2f794421c (diff) | |
parent | 6049479a99f66b620d59498a76ed9f2c3891f4c8 (diff) | |
download | redot-engine-bb5d46bb113bca3204db7678eb69900f159e8087.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.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index db8fbf7a63..0c15f99509 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1893,7 +1893,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { selection.from_line=0; selection.from_column=0; selection.to_line=text.size()-1; - selection.to_column=text[selection.to_line].size(); + selection.to_column=text[selection.to_line].length(); selection.selecting_mode=Selection::MODE_NONE; update(); @@ -2778,6 +2778,11 @@ void TextEdit::copy() { if (!selection.active) return; + print_line("from line: "+itos(selection.from_line)); + print_line("from column: "+itos(selection.from_column)); + print_line("to line: "+itos(selection.to_line)); + print_line("to column: "+itos(selection.to_column)); + String clipboard = _base_get_text(selection.from_line,selection.from_column,selection.to_line,selection.to_column); OS::get_singleton()->set_clipboard(clipboard); @@ -2809,7 +2814,7 @@ void TextEdit::select_all() { selection.from_line=0; selection.from_column=0; selection.to_line=text.size()-1; - selection.to_column=text[selection.to_line].size(); + selection.to_column=text[selection.to_line].length(); selection.selecting_mode=Selection::MODE_NONE; update(); |