]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/stc/stc.cpp
Typos fixed and further clarification of the Python situation on Panther
[wxWidgets.git] / contrib / src / stc / stc.cpp
index ab42de2dfe374631446818f9d109e8cdc3cd0748..a9ca85c5c16ff28696266f08ae5a3c161ca54d26 100644 (file)
@@ -151,7 +151,7 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
                                    const wxString& name)
 {
     wxControl::Create(parent, id, pos, size,
-              style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN,
+                      style | wxWANTS_CHARS | wxCLIP_CHILDREN,
               wxDefaultValidator, name);
 
 #ifdef LINK_LEXERS
@@ -2144,20 +2144,16 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
     if (file.IsOpened())
     {
         wxString contents;
-#if wxUSE_UNICODE
-        wxMemoryBuffer buffer;
-#else
-        wxString buffer;
-#endif
         off_t len = file.Length();
         if (len > 0)
         {
-            void *bufptr = buffer.GetWriteBuf(len);
-            success = (file.Read(bufptr, len) == len);
-            buffer.UngetWriteBuf(len);
 #if wxUSE_UNICODE
+            wxMemoryBuffer buffer(len);
+            success = (file.Read(buffer.GetData(), len) == len);
             contents = wxString(buffer, *wxConvCurrent);
 #else
+            wxString buffer;
+            success = (file.Read(wxStringBuffer(buffer, len), len) == len);
             contents = buffer;
 #endif
         }