diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-27 14:57:44 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-27 14:57:44 +0000 |
commit | 09cace2f7d8fdbfb047eba9a6396d79d59422443 (patch) | |
tree | cca8e0062d7403b9c6a7a87849a50a4ccd89ff9a /plugins/Scriver/src/input.cpp | |
parent | d4feadd097aff1815404597953c3c59527b96598 (diff) |
massive ansi cleaning for Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@13860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/input.cpp')
-rw-r--r-- | plugins/Scriver/src/input.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp index 81c3b5c8d7..69f6691c09 100644 --- a/plugins/Scriver/src/input.cpp +++ b/plugins/Scriver/src/input.cpp @@ -210,16 +210,10 @@ int InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, Common cmdListNew = tcmdlist_last(windowData->cmdList);
}
if (cmdListNew != NULL) {
- char *textBuffer;
- if (windowData->flags & CWDF_RTF_INPUT)
- textBuffer = GetRichTextRTF(hwnd);
- else
- textBuffer = GetRichTextEncoded(hwnd, windowData->codePage);
-
- if (textBuffer != NULL) {
+ char *textBuffer = GetRichTextUtf(hwnd);
+ if (textBuffer != NULL)
+ // takes textBuffer to a queue, no leak here
windowData->cmdList = tcmdlist_append(windowData->cmdList, textBuffer, 20, TRUE);
- mir_free(textBuffer);
- }
}
}
else if (windowData->cmdListCurrent->prev != NULL)
@@ -234,12 +228,9 @@ int InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, Common }
}
if (cmdListNew != NULL) {
- int iLen;
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
- if (windowData->flags & CWDF_RTF_INPUT)
- iLen = SetRichTextRTF(hwnd, cmdListNew->szCmd);
- else
- iLen = SetRichTextEncoded(hwnd, cmdListNew->szCmd);
+
+ int iLen = SetRichText(hwnd, ptrT(mir_utf8decodeT(cmdListNew->szCmd)));
SendMessage(hwnd, EM_SCROLLCARET, 0, 0);
SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
|