From 52131ce5df2aa8fd7261a05f8f1d2bc34c8d5584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 26 Mar 2014 14:10:58 +0000 Subject: Clist_modern: Fix drawing selection for case-sensitive words (filter search) git-svn-id: http://svn.miranda-ng.org/main/trunk@8756 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clcpaint.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 633aa898d0..7cdd633ee3 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -992,7 +992,8 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact if ( dat->filterSearch ) { TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText)); - TCHAR *p1 = _tcsstr(lowered, dat->szQuickSearch); + TCHAR *lowered_search = CharLowerW(NEWTSTR_ALLOCA(dat->szQuickSearch)); + TCHAR *p1 = _tcsstr(lowered, lowered_search); if (p1) idx = int(p1 - lowered); } @@ -1081,7 +1082,8 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact if ( dat->filterSearch ) { TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText)); - TCHAR *p1 = _tcsstr(lowered, dat->szQuickSearch); + TCHAR *lowered_search = CharLowerW(NEWTSTR_ALLOCA(dat->szQuickSearch)); + TCHAR *p1 = _tcsstr(lowered, lowered_search); if (p1) idx = int(p1 - lowered); } @@ -3044,7 +3046,8 @@ void CLCPaint::_DrawContactText( HDC hdcMem, ClcData *dat, ClcContact *Drawing, if ( dat->filterSearch ) { TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText)); - TCHAR *p1 = _tcsstr(lowered, dat->szQuickSearch); + TCHAR *lowered_search = CharLowerW(NEWTSTR_ALLOCA(dat->szQuickSearch)); + TCHAR *p1 = _tcsstr(lowered, lowered_search); if (p1) idx = int(p1 - lowered); } -- cgit v1.2.3