X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/249b31b53b6a91bbd2c9f4e2b56355753f6525c9..046d682f0f684977b7ba933a128f5c84e06ded0e:/src/stc/ScintillaWX.cpp diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 565bfabb2c..f139054299 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -14,12 +14,22 @@ // 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 +#include +#include +#include +#include + +#undef Point +#undef Style #include "ScintillaWX.h" #include "ExternalLexer.h" #include "wx/stc/stc.h" #include "PlatWX.h" -#include #ifdef __WXMSW__ // GetHwndOf() @@ -461,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(); }