X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7bd2132891238da6237dd5ba480fb60bba5975d4..96c9640205933ad0673d5af2c96af0816c50160c:/src/stc/stc.cpp.in diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index ec2e890e47..70f3646ae9 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -210,7 +210,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, SetInitialSize(size); // Reduces flicker on GTK+/X11 - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); // Make sure it can take the focus SetCanFocus(true); @@ -586,9 +586,11 @@ bool wxStyledTextCtrl::GetUseAntiAliasing() { -void wxStyledTextCtrl::AddTextRaw(const char* text) +void wxStyledTextCtrl::AddTextRaw(const char* text, int length) { - SendMsg(SCI_ADDTEXT, strlen(text), (sptr_t)text); + if (length == -1) + length = strlen(text); + SendMsg(SCI_ADDTEXT, length, (sptr_t)text); } void wxStyledTextCtrl::InsertTextRaw(int pos, const char* text) @@ -676,9 +678,11 @@ wxCharBuffer wxStyledTextCtrl::GetTextRaw() return buf; } -void wxStyledTextCtrl::AppendTextRaw(const char* text) +void wxStyledTextCtrl::AppendTextRaw(const char* text, int length) { - SendMsg(SCI_APPENDTEXT, strlen(text), (sptr_t)text); + if (length == -1) + length = strlen(text); + SendMsg(SCI_APPENDTEXT, length, (sptr_t)text); }