]> git.saurik.com Git - wxWidgets.git/commitdiff
Converts DOS line endings to Unix if necessary
authorJulian Smart <julian@anthemion.co.uk>
Tue, 26 Sep 2006 19:18:46 +0000 (19:18 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 26 Sep 2006 19:18:46 +0000 (19:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index c617f47cfabcf53319985d62af0a572a4c5c673e..bb941820ce2123255b903effd21f850bae18d04f 100644 (file)
@@ -1743,7 +1743,8 @@ void wxRichTextCtrl::WriteText(const wxString& value)
 
 void wxRichTextCtrl::DoWriteText(const wxString& value, bool WXUNUSED(selectionOnly))
 {
 
 void wxRichTextCtrl::DoWriteText(const wxString& value, bool WXUNUSED(selectionOnly))
 {
-    GetBuffer().InsertTextWithUndo(m_caretPosition+1, value, this);
+    wxString valueDos = wxTextFile::Translate(value, wxTextFileType_Unix);
+    GetBuffer().InsertTextWithUndo(m_caretPosition+1, valueDos, this);
 }
 
 void wxRichTextCtrl::AppendText(const wxString& text)
 }
 
 void wxRichTextCtrl::AppendText(const wxString& text)