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 /win32 | |
| parent | 2ceaae0b1f19981706806cd71a1dff695b72cc1a (diff) | |
| download | scintilla-mirror-cdad8d8b9e4830a5b97631557c10135d7b12a541.tar.gz | |
Feature [feature-requests:#1316] Allow target to have virtual space.
Diffstat (limited to 'win32')
| -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 ff20740f8..b5ff31bae 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -791,14 +791,14 @@ std::wstring StringMapCase(std::wstring_view wsv, 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 = MultiByteLenFromWideChar(CP_UTF8, characters); if (text) { |
