diff options
| author | Neil <nyamatongwe@gmail.com> | 2020-06-11 16:22:59 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2020-06-11 16:22:59 +1000 |
| commit | 48f0363fe07d2d56b1e4d597abcd7db26e15dd80 (patch) | |
| tree | 83a61e292013a8b723073f85882d94543f885dd5 /win32 | |
| parent | 7a1d35a4877726511f73fc2dc2b3f301224a4cfb (diff) | |
| download | scintilla-mirror-48f0363fe07d2d56b1e4d597abcd7db26e15dd80.tar.gz | |
Fix bug on Win32 where calling WM_GETTEXT for more text than in document could
return less text than in document.
Diffstat (limited to 'win32')
| -rw-r--r-- | win32/ScintillaWin.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 5d0020d30..a0d1c024b 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1342,7 +1342,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); |
