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 /win32/ScintillaWin.cxx | |
| 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 'win32/ScintillaWin.cxx')
| -rw-r--r-- | win32/ScintillaWin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index d9b906c1f..d375c7ca8 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -774,14 +774,14 @@ std::wstring StringMapCase(const std::wstring &ws, DWORD mapFlags) { // Returns the target converted to UTF8. // Return the length in bytes. Sci::Position ScintillaWin::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 std::string s = RangeText(targetStart, targetEnd); + const std::string s = RangeText(targetRange.start.Position(), targetRange.end.Position()); const std::wstring characters = StringDecode(s, CodePageOfDocument()); const int utf8Len = ::WideCharToMultiByte(CP_UTF8, 0, characters.c_str(), static_cast<int>(characters.length()), NULL, 0, 0, 0); if (text) { |
