]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't include the nul byte when copying to the clipboard
authorRobin Dunn <robin@alldunn.com>
Sun, 3 Apr 2005 23:53:04 +0000 (23:53 +0000)
committerRobin Dunn <robin@alldunn.com>
Sun, 3 Apr 2005 23:53:04 +0000 (23:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index 9dd7697117f0922c9fd628357b2485df5e674d06..f139054299741fd4121e13df1fc20ccba54cbb10 100644 (file)
@@ -471,7 +471,7 @@ void ScintillaWX::Paste() {
 void ScintillaWX::CopyToClipboard(const SelectionText& st) {
     if (wxTheClipboard->Open()) {
         wxTheClipboard->UsePrimarySelection(false);
-        wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len));
+        wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len-1));
         wxTheClipboard->SetData(new wxTextDataObject(text));
         wxTheClipboard->Close();
     }
index 9dd7697117f0922c9fd628357b2485df5e674d06..f139054299741fd4121e13df1fc20ccba54cbb10 100644 (file)
@@ -471,7 +471,7 @@ void ScintillaWX::Paste() {
 void ScintillaWX::CopyToClipboard(const SelectionText& st) {
     if (wxTheClipboard->Open()) {
         wxTheClipboard->UsePrimarySelection(false);
-        wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len));
+        wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len-1));
         wxTheClipboard->SetData(new wxTextDataObject(text));
         wxTheClipboard->Close();
     }