aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-06-11 16:22:59 +1000
committerNeil <nyamatongwe@gmail.com>2020-06-11 16:22:59 +1000
commit5ebd653f630d2f37c696f7f6928de4fa133b8486 (patch)
treec847e71248933e357745ccae011b859d2b7c3dd1 /win32/ScintillaWin.cxx
parent87342a6cec6c3239e9891481f7774ffeef4fa71f (diff)
downloadscintilla-mirror-5ebd653f630d2f37c696f7f6928de4fa133b8486.tar.gz
Backport: Fix bug on Win32 where calling WM_GETTEXT for more text than in document could
return less text than in document. Backport of changeset 8302:2faf8ba9d1fb.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 668a450a8..83d83daae 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1327,7 +1327,7 @@ sptr_t ScintillaWin::GetText(uptr_t wParam, sptr_t lParam) {
Sci::Position sizeRequestedRange = pdoc->GetRelativePositionUTF16(0, lengthWanted);
if (sizeRequestedRange < 0) {
// Requested more text than there is in the document.
- sizeRequestedRange = pdoc->CountUTF16(0, pdoc->Length());
+ sizeRequestedRange = pdoc->Length();
}
std::string docBytes(sizeRequestedRange, '\0');
pdoc->GetCharRange(&docBytes[0], 0, sizeRequestedRange);