// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
+#define Point macPoint // These names are also defined by some mac headers so
+#define Style macStyle // change their names, and then undef before we need them
+
+#include <wx/wx.h>
+#include <wx/textbuf.h>
+#include <wx/dataobj.h>
+#include <wx/clipbrd.h>
+#include <wx/dnd.h>
+
+#undef Point
+#undef Style
#include "ScintillaWX.h"
#include "ExternalLexer.h"
#include "wx/stc/stc.h"
#include "PlatWX.h"
-#include <wx/textbuf.h>
#ifdef __WXMSW__
// GetHwndOf()
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();
}