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 | a14f5340b58421aa8a107deca0eefabe5de5d3fd (patch) | |
| tree | e12b5cd84619b36ed299d669968a0a7717a8c131 /cocoa | |
| parent | 3b72fe93906e4c6b8c800cf2c7b986bc2c2c89a2 (diff) | |
| download | scintilla-mirror-a14f5340b58421aa8a107deca0eefabe5de5d3fd.tar.gz | |
Backport: Feature [feature-requests:#1316] Allow target to have virtual space.
Backport of changeset 7768:5d73aa55a6ee.
Diffstat (limited to 'cocoa')
| -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 b40743dad..3f0280e01 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1661,18 +1661,18 @@ bool ScintillaCocoa::GetPasteboardData(NSPasteboard* board, SelectionText* selec // 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; |
