|
@@ -4084,7 +4084,7 @@ void TextEdit::cut() {
|
|
|
backspace_at_cursor();
|
|
|
update();
|
|
|
cursor_set_line(cursor.line + 1);
|
|
|
- cut_copy_line = true;
|
|
|
+ cut_copy_line = clipboard;
|
|
|
|
|
|
} else {
|
|
|
|
|
@@ -4098,7 +4098,7 @@ void TextEdit::cut() {
|
|
|
selection.active = false;
|
|
|
selection.selecting_mode = Selection::MODE_NONE;
|
|
|
update();
|
|
|
- cut_copy_line = false;
|
|
|
+ cut_copy_line = "";
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4107,11 +4107,11 @@ void TextEdit::copy() {
|
|
|
if (!selection.active) {
|
|
|
String clipboard = _base_get_text(cursor.line, 0, cursor.line, text[cursor.line].length());
|
|
|
OS::get_singleton()->set_clipboard(clipboard);
|
|
|
- cut_copy_line = true;
|
|
|
+ cut_copy_line = clipboard;
|
|
|
} else {
|
|
|
String clipboard = _base_get_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column);
|
|
|
OS::get_singleton()->set_clipboard(clipboard);
|
|
|
- cut_copy_line = false;
|
|
|
+ cut_copy_line = "";
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4127,7 +4127,7 @@ void TextEdit::paste() {
|
|
|
cursor_set_line(selection.from_line);
|
|
|
cursor_set_column(selection.from_column);
|
|
|
|
|
|
- } else if (cut_copy_line) {
|
|
|
+ } else if (!cut_copy_line.empty() && cut_copy_line == clipboard) {
|
|
|
|
|
|
cursor_set_column(0);
|
|
|
String ins = "\n";
|