aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/ScintillaDoc.html
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2022-11-22 09:24:07 +1100
committerNeil <nyamatongwe@gmail.com>2022-11-22 09:24:07 +1100
commitcb8cd73d839a96f98bb1ce887c694271f9c24788 (patch)
tree1920fae848da38e7942ea9a36c21f87272254e23 /doc/ScintillaDoc.html
parentb3e46461ce564d295b629a1d16dc4cee60722e66 (diff)
downloadscintilla-mirror-cb8cd73d839a96f98bb1ce887c694271f9c24788.tar.gz
Add SCI_REPLACETARGETMINIMAL to change text without causing unchanged prefix and
suffix to be marked as modified in change history.
Diffstat (limited to 'doc/ScintillaDoc.html')
-rw-r--r--doc/ScintillaDoc.html25
1 files changed, 19 insertions, 6 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index cab6e397c..8fe205014 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -129,7 +129,7 @@
<h1>Scintilla Documentation</h1>
- <p>Last edited 26 October 2022 NH</p>
+ <p>Last edited 15 November 2022 NH</p>
<p style="background:#90F0C0">Scintilla 5 has moved the lexers from Scintilla into a new
<a href="Lexilla.html">Lexilla</a> project.<br />
@@ -821,6 +821,7 @@ struct Sci_TextRangeFull {
<a class="message" href="#SCI_SEARCHINTARGET">SCI_SEARCHINTARGET(position length, const char *text) &rarr; position</a><br />
<a class="message" href="#SCI_GETTARGETTEXT">SCI_GETTARGETTEXT(&lt;unused&gt;, char *text) &rarr; position</a><br />
<a class="message" href="#SCI_REPLACETARGET">SCI_REPLACETARGET(position length, const char *text) &rarr; position</a><br />
+ <a class="message" href="#SCI_REPLACETARGETMINIMAL">SCI_REPLACETARGETMINIMAL(position length, const char *text) &rarr; position</a><br />
<a class="message" href="#SCI_REPLACETARGETRE">SCI_REPLACETARGETRE(position length, const char *text) &rarr; position</a><br />
<a class="message" href="#SCI_GETTAG">SCI_GETTAG(int tagNumber, char *tagValue) &rarr; int</a><br />
</code>
@@ -870,9 +871,21 @@ struct Sci_TextRangeFull {
<p><b id="SCI_REPLACETARGET">SCI_REPLACETARGET(position length, const char *text) &rarr; position</b><br />
If <code class="parameter">length</code> is -1, <code class="parameter">text</code> is a zero terminated string, otherwise
<code class="parameter">length</code> sets the number of character to replace the target with.
- After replacement, the target range refers to the replacement text.
- The return value
- is the length of the replacement string.<br />
+ After replacement, the target range refers to the replacement text.
+ The return value is the length of the replacement string.<br />
+ Note that the recommended way to delete text in the document is to set the target to the text to be removed,
+ and to perform a replace target with an empty string.</p>
+
+ <p><b id="SCI_REPLACETARGETMINIMAL">SCI_REPLACETARGETMINIMAL(position length, const char *text) &rarr; position</b><br />
+ This is similar to <a class="message" href="#SCI_REPLACETARGET"><code>SCI_REPLACETARGET</code></a>
+ but tries to minimize change history when the current target text shares a common prefix or suffix with the replacement.
+ Only the text that is actually different is marked as changed.
+ This might be used when automatically reformatting some text
+ so that the whole area formatted doesn't show change marks.
+ If <code class="parameter">length</code> is -1, <code class="parameter">text</code> is a zero terminated string, otherwise
+ <code class="parameter">length</code> sets the number of character to replace the target with.
+ After replacement, the target range refers to the replacement text.
+ The return value is the length of the replacement string.<br />
Note that the recommended way to delete text in the document is to set the target to the text to be removed,
and to perform a replace target with an empty string.</p>
@@ -882,8 +895,8 @@ struct Sci_TextRangeFull {
characters to use. The replacement string is formed from the text string with any sequences of
<code>\1</code> through <code>\9</code> replaced by tagged matches from the most recent regular
expression search. <code>\0</code> is replaced with all the matched text from the most recent search.
- After replacement, the target range refers to the replacement text.
- The return value is the length of the replacement string.</p>
+ After replacement, the target range refers to the replacement text.
+ The return value is the length of the replacement string.</p>
<p><b id="SCI_GETTAG">SCI_GETTAG(int tagNumber, char *tagValue NUL-terminated) &rarr; int</b><br />
Discover what text was matched by tagged expressions in a regular expression search.