From 273f2486599617aac4343998bf15dc03f170dbcf Mon Sep 17 00:00:00 2001
From: Mitchell Foral
Date: Mon, 20 Nov 2017 12:24:51 +1100
Subject: Add SCI_GETMOVEEXTENDSSELECTION.
---
doc/ScintillaDoc.html | 5 +++++
doc/ScintillaHistory.html | 4 ++++
include/Scintilla.h | 1 +
include/Scintilla.iface | 3 +++
src/Editor.cxx | 2 ++
5 files changed, 15 insertions(+)
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index 91eca2c99..90c5745e2 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -1222,6 +1222,7 @@ struct Sci_TextToFind {
SCI_SELECTIONISRECTANGLE → bool
SCI_SETSELECTIONMODE(int selectionMode)
SCI_GETSELECTIONMODE → int
+ SCI_GETMOVEEXTENDSSELECTION → bool
SCI_GETLINESELSTARTPOSITION(int line) → position
SCI_GETLINESELENDPOSITION(int line) → position
SCI_MOVECARETINSIDEVIEW
@@ -1425,6 +1426,10 @@ struct Sci_TextToFind {
SC_SEL_THIN is the mode after a rectangular selection has been typed into and ensures
that no characters are selected.
+ SCI_GETMOVEEXTENDSSELECTION → bool
+ This returns 1 if regular caret moves will extend or reduce the selection, 0 if not.
+ SCI_SETSELECTIONMODE toggles this setting between on and off.
+
SCI_GETLINESELSTARTPOSITION(int line) → position
SCI_GETLINESELENDPOSITION(int line) → position
Retrieve the position of the start and end of the selection at the given line with
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 265a968cf..aa61b69fe 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -534,6 +534,10 @@
Released 26 October 2017.
+ Add SCI_GETMOVEEXTENDSSELECTION to allow applications to add more
+ complex selection commands.
+
+
Improve VHDL lexer's handling of character literals and escape characters in strings.
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 95d8b6957..25649302e 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -758,6 +758,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_SEL_THIN 3
#define SCI_SETSELECTIONMODE 2422
#define SCI_GETSELECTIONMODE 2423
+#define SCI_GETMOVEEXTENDSSELECTION 2706
#define SCI_GETLINESELSTARTPOSITION 2424
#define SCI_GETLINESELENDPOSITION 2425
#define SCI_LINEDOWNRECTEXTEND 2426
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index 1060b2dd1..04de613a5 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -1964,6 +1964,9 @@ set void SetSelectionMode=2422(int selectionMode,)
# Get the mode of the current selection.
get int GetSelectionMode=2423(,)
+# Get whether or not regular caret moves will extend or reduce the selection.
+get bool GetMoveExtendsSelection=2706(,)
+
# Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
fun position GetLineSelStartPosition=2424(int line,)
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 163be5c15..d45a8684c 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7625,6 +7625,8 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
default: // ?!
return SC_SEL_STREAM;
}
+ case SCI_GETMOVEEXTENDSSELECTION:
+ return sel.MoveExtends();
case SCI_GETLINESELSTARTPOSITION:
case SCI_GETLINESELENDPOSITION: {
SelectionSegment segmentLine(
--
cgit v1.2.3