]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied [ 857819 ] STC CopyToClipboard uses LF on win32
authorJulian Smart <julian@anthemion.co.uk>
Thu, 11 Dec 2003 11:32:44 +0000 (11:32 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 11 Dec 2003 11:32:44 +0000 (11:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/stc/ScintillaWX.cpp
src/stc/ScintillaWX.cpp

index 6acb7805d1a7996cc1e8831ecf9099f809d7442f..1fbbf77860047cb87b1aa6d0a99405639151981b 100644 (file)
@@ -19,6 +19,7 @@
 #include "ExternalLexer.h"
 #include "wx/stc/stc.h"
 #include "PlatWX.h"
+#include <wx/textbuf.h>
 
 //----------------------------------------------------------------------
 // Helper classes
@@ -384,7 +385,7 @@ void ScintillaWX::Paste() {
 void ScintillaWX::CopyToClipboard(const SelectionText& st) {
     if (wxTheClipboard->Open()) {
         wxTheClipboard->UsePrimarySelection(FALSE);
-        wxString text = stc2wx(st.s, st.len);
+        wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len));
         wxTheClipboard->SetData(new wxTextDataObject(text));
         wxTheClipboard->Close();
     }
index 6acb7805d1a7996cc1e8831ecf9099f809d7442f..1fbbf77860047cb87b1aa6d0a99405639151981b 100644 (file)
@@ -19,6 +19,7 @@
 #include "ExternalLexer.h"
 #include "wx/stc/stc.h"
 #include "PlatWX.h"
+#include <wx/textbuf.h>
 
 //----------------------------------------------------------------------
 // Helper classes
@@ -384,7 +385,7 @@ void ScintillaWX::Paste() {
 void ScintillaWX::CopyToClipboard(const SelectionText& st) {
     if (wxTheClipboard->Open()) {
         wxTheClipboard->UsePrimarySelection(FALSE);
-        wxString text = stc2wx(st.s, st.len);
+        wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len));
         wxTheClipboard->SetData(new wxTextDataObject(text));
         wxTheClipboard->Close();
     }