aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/ScintillaGTK.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-11-15 09:25:29 +1100
committerNeil <nyamatongwe@gmail.com>2019-11-15 09:25:29 +1100
commita14f5340b58421aa8a107deca0eefabe5de5d3fd (patch)
treee12b5cd84619b36ed299d669968a0a7717a8c131 /gtk/ScintillaGTK.cxx
parent3b72fe93906e4c6b8c800cf2c7b986bc2c2c89a2 (diff)
downloadscintilla-mirror-a14f5340b58421aa8a107deca0eefabe5de5d3fd.tar.gz
Backport: Feature [feature-requests:#1316] Allow target to have virtual space.
Backport of changeset 7768:5d73aa55a6ee.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rwxr-xr-xgtk/ScintillaGTK.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 8ed9ea1ce..42a15acd5 100755
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -756,16 +756,16 @@ std::string ConvertText(const char *s, size_t len, const char *charSetDest,
// Returns the target converted to UTF8.
// Return the length in bytes.
Sci::Position ScintillaGTK::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 char *charSetBuffer = CharacterSetID();
if (*charSetBuffer) {
- std::string s = RangeText(targetStart, targetEnd);
+ std::string s = RangeText(targetRange.start.Position(), targetRange.end.Position());
std::string tmputf = ConvertText(&s[0], targetLength, "UTF-8", charSetBuffer, false);
if (text) {
memcpy(text, tmputf.c_str(), tmputf.length());
@@ -773,7 +773,7 @@ Sci::Position ScintillaGTK::TargetAsUTF8(char *text) const {
return tmputf.length();
} else {
if (text) {
- pdoc->GetCharRange(text, targetStart, targetLength);
+ pdoc->GetCharRange(text, targetRange.start.Position(), targetLength);
}
}
}