aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaDoc.html2
-rw-r--r--include/Scintilla.h1
-rw-r--r--include/Scintilla.iface3
-rw-r--r--src/Editor.cxx5
4 files changed, 11 insertions, 0 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index 77e723e04..1697af2ee 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -637,6 +637,7 @@ struct Sci_TextRange {
<a class="message" href="#SCI_GETTARGETSTART">SCI_GETTARGETSTART</a><br />
<a class="message" href="#SCI_SETTARGETEND">SCI_SETTARGETEND(int pos)</a><br />
<a class="message" href="#SCI_GETTARGETEND">SCI_GETTARGETEND</a><br />
+ <a class="message" href="#SCI_SETTARGETRANGE">SCI_SETTARGETRANGE(int start, int end)</a><br />
<a class="message" href="#SCI_TARGETFROMSELECTION">SCI_TARGETFROMSELECTION</a><br />
<a class="message" href="#SCI_SETSEARCHFLAGS">SCI_SETSEARCHFLAGS(int searchFlags)</a><br />
<a class="message" href="#SCI_GETSEARCHFLAGS">SCI_GETSEARCHFLAGS</a><br />
@@ -653,6 +654,7 @@ struct Sci_TextRange {
<b id="SCI_GETTARGETSTART">SCI_GETTARGETSTART</b><br />
<b id="SCI_SETTARGETEND">SCI_SETTARGETEND(int pos)</b><br />
<b id="SCI_GETTARGETEND">SCI_GETTARGETEND</b><br />
+ <b id="SCI_SETTARGETRANGE">SCI_SETTARGETRANGE(int start, int end)</b><br />
These functions set and return the start and end of the target. When searching
you can set start greater than end to find the last matching text in the
target rather than the first matching text. The target is also set by a successful
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 199986c25..018a6d8bd 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -432,6 +432,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETTARGETSTART 2191
#define SCI_SETTARGETEND 2192
#define SCI_GETTARGETEND 2193
+#define SCI_SETTARGETRANGE 2686
#define SCI_REPLACETARGET 2194
#define SCI_REPLACETARGETRE 2195
#define SCI_SEARCHINTARGET 2197
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index c540639da..7373384c8 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -1059,6 +1059,9 @@ set void SetTargetEnd=2192(position pos,)
# Get the position that ends the target.
get position GetTargetEnd=2193(,)
+# Sets both the start and end of the target in one call.
+fun void SetTargetRange=2686(position start, position end)
+
# Replace the target text with the argument text.
# Text is counted so it can contain NULs.
# Returns the length of the replacement text.
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 382e173c3..5935037d6 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -5561,6 +5561,11 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_GETTARGETEND:
return targetEnd;
+ case SCI_SETTARGETRANGE:
+ targetStart = static_cast<int>(wParam);
+ targetEnd = static_cast<int>(lParam);
+ break;
+
case SCI_TARGETFROMSELECTION:
if (sel.MainCaret() < sel.MainAnchor()) {
targetStart = sel.MainCaret();