diff options
| author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2019-05-31 16:47:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-31 16:47:55 +0200 |
| commit | 95f2567a8b3b22ec44a097d1f4cde4f8d3d1dde8 (patch) | |
| tree | 7628dcb8538b7d8fc0adf081248e0cf6e566762f /scene | |
| parent | 29645c81476cb2f843f36070533281ba275f9400 (diff) | |
| parent | af2c742f531e6d998c69286ad162b60b42c842c1 (diff) | |
Merge pull request #29347 from akien-mga/string-strip-escapes
Fix and expose String::strip_escapes(), use it in LineEdit paste
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/gui/line_edit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 1f778bc516..cc966efee9 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -923,7 +923,8 @@ void LineEdit::cut_text() { void LineEdit::paste_text() { - String paste_buffer = OS::get_singleton()->get_clipboard(); + // Strip escape characters like \n and \t as they can't be displayed on LineEdit. + String paste_buffer = OS::get_singleton()->get_clipboard().strip_escapes(); if (paste_buffer != "") { |