diff options
Diffstat (limited to 'doc/ScintillaDoc.html')
-rw-r--r-- | doc/ScintillaDoc.html | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 12f2be0eb..4a10d280f 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -2063,9 +2063,9 @@ struct Sci_TextToFindFull { </p> <p>The history should first be set up with <code>SCI_PUSHUNDOACTIONTYPE</code>, and - <code>SCI_CHANGELASTUNDOACTIONTEXT</code> then the save, current, and tentativ points set - with <code>SCI_SETUNDOSAVEPOINT</code>, <code>SCI_SETUNDOCURRENT</code>, and - <code>SCI_SETUNDOTENTATIVE</code>. + <code>SCI_CHANGELASTUNDOACTIONTEXT</code> then the save, current, and tentative points set + with <code>SCI_SETUNDOSAVEPOINT</code>, <code>SCI_SETUNDOTENTATIVE</code>, and + <code>SCI_SETUNDOCURRENT</code>. </p> <p><code>SCI_PUSHUNDOACTIONTYPE(int type, position pos)</code> appends an action to the undo stack @@ -2073,6 +2073,14 @@ struct Sci_TextToFindFull { <code>SCI_CHANGELASTUNDOACTIONTEXT(position length, const char *text)</code>. </p> + <p> + The last restoration API called should be <code>SCI_SETUNDOCURRENT</code> as this validates + the restored history and values against the document. For example, an undo history that could cause a negative + document length or inserting / removing text outside the document is invalid. + If the restored undo state is invalid then a failure status is set and the undo history cleared. + Check for failure with <a class="seealso" href="#SCI_GETSTATUS">SCI_GETSTATUS</a>. + </p> + <p>The current implementation may only work when the current and save point are the same and there is no tentative point. </p> |