diff --git a/tools/apps/hgjson/hgjsonDlg.cpp b/tools/apps/hgjson/hgjsonDlg.cpp index af4af5c..9808599 100644 --- a/tools/apps/hgjson/hgjsonDlg.cpp +++ b/tools/apps/hgjson/hgjsonDlg.cpp @@ -7054,8 +7054,22 @@ void ChgjsonDlg::OnBnClickedButton2() pos = txt.find("\\u", pos + 3); } + // divide into multi-lines with 16KB per line ... + int lines = 1; + pos = txt.length(); + while (pos > 16 * 1024) + { + pos -= 12 * 1024; + while (txt[pos - 1] == '\\') + pos++; + txt.insert(pos, "\r\n"); + lines++; + } file_util::set_clipboard(txt.c_str(), txt.length()); - MessageBox(TEXT("JSON text has set to clipboard already")); + + TCHAR msg[128] = { 0 }; + _stprintf(msg, TEXT("%d lines"), lines); + MessageBox(TEXT("JSON text has set to clipboard already"), msg); } diff --git a/tools/solution/Release/hgjson.exe b/tools/solution/Release/hgjson.exe index 172a0ce..88c5e3a 100644 Binary files a/tools/solution/Release/hgjson.exe and b/tools/solution/Release/hgjson.exe differ