[BUG_FIXED] (Author: Andreas Jonsson) Fix lower/UPPER case on selected text which contains NULL characters.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@922 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2012-06-30 15:41:18 +00:00
parent e2a165cc8e
commit 4a8cb6d15e

View File

@ -2403,7 +2403,9 @@ void ScintillaEditView::convertSelectedTextTo(bool Case)
} }
::WideCharToMultiByte(codepage, 0, selectedStrW, strWSize, selectedStr, strSize, NULL, NULL); ::WideCharToMultiByte(codepage, 0, selectedStrW, strWSize, selectedStr, strSize, NULL, NULL);
execute(SCI_REPLACESEL, strSize, (LPARAM)selectedStr); execute(SCI_SETTARGETSTART, selectionStart);
execute(SCI_SETTARGETEND, selectionEnd);
execute(SCI_REPLACETARGET, strSize - 1, (LPARAM)selectedStr);
execute(SCI_SETSEL, selectionStart, selectionEnd); execute(SCI_SETSEL, selectionStart, selectionEnd);
delete [] selectedStr; delete [] selectedStr;
delete [] selectedStrW; delete [] selectedStrW;