diff options
author | Neil <nyamatongwe@gmail.com> | 2019-11-15 09:25:29 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-11-15 09:25:29 +1100 |
commit | cdad8d8b9e4830a5b97631557c10135d7b12a541 (patch) | |
tree | 107503ddd3001bb23992cad9ebfdebb05a7160db /cocoa/ScintillaCocoa.mm | |
parent | 2ceaae0b1f19981706806cd71a1dff695b72cc1a (diff) | |
download | scintilla-mirror-cdad8d8b9e4830a5b97631557c10135d7b12a541.tar.gz |
Feature [feature-requests:#1316] Allow target to have virtual space.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r-- | cocoa/ScintillaCocoa.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index bc6bb3698..e9284888f 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1598,15 +1598,15 @@ bool ScintillaCocoa::GetPasteboardData(NSPasteboard *board, SelectionText *selec // Returns the target converted to UTF8. // Return the length in bytes. Sci::Position ScintillaCocoa::TargetAsUTF8(char *text) const { - const Sci::Position targetLength = targetEnd - targetStart; + const Sci::Position targetLength = targetRange.Length(); if (IsUnicodeMode()) { if (text) - pdoc->GetCharRange(text, targetStart, targetLength); + pdoc->GetCharRange(text, targetRange.start.Position(), targetLength); } else { // Need to convert const CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), vs.styles[STYLE_DEFAULT].characterSet); - const std::string s = RangeText(targetStart, targetEnd); + const std::string s = RangeText(targetRange.start.Position(), targetRange.end.Position()); CFStringRef cfsVal = CFStringFromString(s.c_str(), s.length(), encoding); if (!cfsVal) { return 0; |