From 74815ce2e9b6458221c7bdf53ec2215c8c7baa4e Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sat, 4 May 2019 11:32:21 +1000 Subject: Bug [#2102]. Explain behaviour when length argument longer than document. --- doc/ScintillaDoc.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 8d6d54777..961babc34 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -469,8 +469,9 @@

SCI_GETTEXT(int length, char *text NUL-terminated) → int
- This returns length-1 characters of text from the start of the document plus one - terminating 0 character. To collect all the text in a document, use SCI_GETLENGTH + This returns at most length-1 characters of text from the start of the document plus one + terminating 0 character. When length-1 is beyond document length, it returns document length. + To collect all the text in a document, use SCI_GETLENGTH to get the number of characters in the document (nLen), allocate a character buffer of length nLen+1 bytes, then call SCI_GETTEXT(nLen+1, char *text). If the text argument is 0 then the length that should be allocated to store the -- cgit v1.2.3