reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 23517d309c46d28de87294734204054c0cd850a1
parent 9f491283ae7c19f132db0b79fb5490b6e6038e12
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun, 22 May 2016 13:59:16 -0700

manager: fix copy url action on windows

Diffstat:
Msrc/manager.cpp | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/manager.cpp b/src/manager.cpp @@ -276,7 +276,7 @@ void Manager::copyUrl(const int index) return; const auto_string &data = make_autostring(remote.url()); - const size_t length = data.size() * sizeof(auto_char); + const size_t length = (data.size() * sizeof(auto_char)) + 1; // null terminator HANDLE mem = GlobalAlloc(GMEM_MOVEABLE, length); memcpy(GlobalLock(mem), data.c_str(), length); @@ -284,7 +284,11 @@ void Manager::copyUrl(const int index) OpenClipboard(handle()); EmptyClipboard(); +#ifdef _WIN32 + SetClipboardData(CF_UNICODETEXT, mem); +#else SetClipboardData(CF_TEXT, mem); +#endif CloseClipboard(); }