From 67de1ebbc6d3ff8c9e67d4d796de0d4df8301b6f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 Dec 2023 12:12:43 +0300 Subject: =?UTF-8?q?fixes=20#4012=20(NewStory:=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=8B=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=BF=D0=B0=D0=B4=D0=B0=D1=8E=D1=82)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/history_control.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 60687e79df..cd25eb3cca 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -229,8 +229,13 @@ void NewstoryListData::BeginEditItem() int fontid, colorid; item->getFontColor(fontid, colorid); + // #4012 make sure that both single & double CRLF are now double + CMStringW wszText(item->getWBuf()); + wszText.Replace(L"\r\n", L"\n"); + wszText.Replace(L"\n", L"\r\n"); + uint32_t dwStyle = WS_CHILD | WS_BORDER | ES_MULTILINE | ES_AUTOVSCROLL; - hwndEditBox = CreateWindow(L"EDIT", item->getWBuf(), dwStyle, 0, top, rc.right - rc.left, itemHeight, m_hwnd, NULL, g_plugin.getInst(), NULL); + hwndEditBox = CreateWindow(L"EDIT", wszText, dwStyle, 0, top, rc.right - rc.left, itemHeight, m_hwnd, NULL, g_plugin.getInst(), NULL); mir_subclassWindow(hwndEditBox, HistoryEditWndProc); SendMessage(hwndEditBox, WM_SETFONT, (WPARAM)g_fontTable[fontid].hfnt, 0); SendMessage(hwndEditBox, EM_SETMARGINS, EC_RIGHTMARGIN, 100); -- cgit v1.2.3