Applied patch from Armel Asselin that reduces memory required when
pasting text and when sending events. Comment out some unneeded asserts. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3186,12 +3186,7 @@ static void SetEventText(wxStyledTextEvent& evt, const char* text,
|
||||
size_t length) {
|
||||
if(!text) return;
|
||||
|
||||
// The unicode conversion MUST have a null byte to terminate the
|
||||
// string so move it into a buffer first and give it one.
|
||||
wxMemoryBuffer buf(length+1);
|
||||
buf.AppendData((void*)text, length);
|
||||
buf.AppendByte(0);
|
||||
evt.SetText(stc2wx(buf));
|
||||
evt.SetText(stc2wx(text, length));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user