]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextbuffer.cpp
use wxCollapsiblePane in the log dialog (patch 1624796)
[wxWidgets.git] / src / richtext / richtextbuffer.cpp
index bbdebd1b79b9be8a73040ab853607bff50afda18..4b78f068089f7bd748f475b04da170594b1e191e 100644 (file)
@@ -3921,9 +3921,11 @@ bool wxRichTextParagraph::FindWrapPosition(const wxRichTextRange& range, wxDC& d
         else
         {
             int spacePos = plainText.Find(wxT(' '), true);
-            if (spacePos != wxNOT_FOUND)
+            int tabPos = plainText.Find(wxT('\t'), true);
+            int pos = wxMax(spacePos, tabPos);
+            if (pos != wxNOT_FOUND)
             {
-                int positionsFromEndOfString = plainText.length() - spacePos - 1;
+                int positionsFromEndOfString = plainText.length() - pos - 1;
                 breakPosition = breakPosition - positionsFromEndOfString;
             }
         }
@@ -8199,8 +8201,8 @@ bool wxRichTextImageBlock::ReadHex(wxInputStream& stream, int length, int imageT
     int i;
     for (i = 0; i < dataSize; i ++)
     {
-        str[0] = stream.GetC();
-        str[1] = stream.GetC();
+        str[0] = (char)stream.GetC();
+        str[1] = (char)stream.GetC();
 
         m_data[i] = (unsigned char)wxHexToDec(str);
     }