aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-04-07 07:33:17 +1000
committerNeil <nyamatongwe@gmail.com>2021-04-07 07:33:17 +1000
commitf117e7a1d665a6c79d50ef90345aee2667721999 (patch)
tree3db1fec7a5a5e0981ae68b3774774d51c6a1dbe4
parent0f2d0f94932fc03d740451d2cbf70c14a4e9ed63 (diff)
downloadscintilla-mirror-f117e7a1d665a6c79d50ef90345aee2667721999.tar.gz
Feature [feature-requests:#1364]. Correct argument to TextWide for
autocompletion lists.
-rw-r--r--win32/PlatWin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 9f2d22c4e..8c7a9adb9 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -3054,7 +3054,7 @@ PRectangle ListBoxX::GetDesiredRect() {
if (widestItem) {
len = static_cast<int>(strlen(widestItem));
if (unicodeMode) {
- const TextWide tbuf(widestItem, unicodeMode);
+ const TextWide tbuf(widestItem, SC_CP_UTF8);
::GetTextExtentPoint32W(hdc, tbuf.buffer, tbuf.tlen, &textSize);
} else {
::GetTextExtentPoint32A(hdc, widestItem, len, &textSize);
@@ -3188,7 +3188,7 @@ void ListBoxX::Draw(DRAWITEMSTRUCT *pDrawItem) {
::InsetRect(&rcText, static_cast<int>(TextInset.x), static_cast<int>(TextInset.y));
if (unicodeMode) {
- const TextWide tbuf(text, unicodeMode);
+ const TextWide tbuf(text, SC_CP_UTF8);
::DrawTextW(pDrawItem->hDC, tbuf.buffer, tbuf.tlen, &rcText, DT_NOPREFIX|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOCLIP);
} else {
::DrawTextA(pDrawItem->hDC, text, len, &rcText, DT_NOPREFIX|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOCLIP);