diff options
author | Zae <zaevi@live.com> | 2020-07-20 15:22:40 +0800 |
---|---|---|
committer | Zae <zaevi@live.com> | 2020-07-20 23:07:20 +0800 |
commit | 0107550cf16e3701e076263393e3b6da5d725759 (patch) | |
tree | 7c077cbf128210e054d87b59e72f098f641b8f53 /platform/windows | |
parent | 173ebe487284fddb9f07cdf90ef58cb1c9f69b74 (diff) |
fix crlf for clipboard
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 0251ffe664..6ee9b6d698 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -170,7 +170,7 @@ void DisplayServerWindows::clipboard_set(const String &p_text) { // Convert LF line endings to CRLF in clipboard content // Otherwise, line endings won't be visible when pasted in other software - String text = p_text.replace("\n", "\r\n"); + String text = p_text.replace("\r\n", "\n").replace("\n", "\r\n"); // avoid \r\r\n if (!OpenClipboard(windows[last_focused_window].hWnd)) { ERR_FAIL_MSG("Unable to open clipboard."); |