From a3dd1952c420158febe7a11d596ba3f402eb17ab Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 5 Nov 2023 14:59:49 +1100 Subject: Add SCI_CHANGESELECTIONMODE to simplify selection mode manipulation. --- doc/ScintillaDoc.html | 15 +++++++++------ doc/ScintillaHistory.html | 3 ++- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 43407a40b..dcabdd9ee 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -979,6 +979,7 @@ struct Sci_TextRangeFull { SCI_GETCURLINE(position length, char *text) → position
SCI_SELECTIONISRECTANGLE → bool
SCI_SETSELECTIONMODE(int selectionMode)
+ SCI_CHANGESELECTIONMODE(int selectionMode)
SCI_GETSELECTIONMODE → int
SCI_SETMOVEEXTENDSSELECTION(bool moveExtendsSelection)
SCI_GETMOVEEXTENDSSELECTION → bool
@@ -1122,17 +1123,19 @@ struct Sci_TextRangeFull {

SCI_SELECTIONISRECTANGLE → bool
This returns 1 if the current selection is in rectangle mode, 0 if not.

-

SCI_SETSELECTIONMODE(int selectionMode)
+

+ SCI_SETSELECTIONMODE(int selectionMode)
+ SCI_CHANGESELECTIONMODE(int selectionMode)
SCI_GETSELECTIONMODE → int
- The two functions set and get the selection mode, which can be + The functions set, change, and get the selection mode, which can be stream (SC_SEL_STREAM=0) or rectangular (SC_SEL_RECTANGLE=1) or by lines (SC_SEL_LINES=2) or thin rectangular (SC_SEL_THIN=3). - When set in these modes, regular caret moves will extend or reduce the selection, - until the mode is cancelled by a call with same value or with SCI_CANCEL. - The get function returns the current mode even if the selection was made by mouse - or with regular extended moves. + When SCI_SETSELECTIONMODE sets these modes, regular caret moves will extend or reduce the selection, + until the mode is cancelled by a call with same value, or with SCI_CANCEL, or with SCI_SETMOVEEXTENDSSELECTION. + SCI_CHANGESELECTIONMODE sets the mode but does not make regular caret moves extend or reduce the selection.

+

The get function returns the current mode even if the selection was made by mouse or with regular extended moves. SC_SEL_THIN is the mode after a rectangular selection has been typed into and ensures that no characters are selected.

diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index f823ee0ef..b808bd4b8 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -591,7 +591,8 @@ Released 18 November 2023.
  • - Add SCI_SETMOVEEXTENDSSELECTION to simplify selection mode manipulation. + Add SCI_SETMOVEEXTENDSSELECTION and SCI_CHANGESELECTIONMODE to + simplify selection mode manipulation.
  • Improve performance of global replace by reducing cache invalidation overhead. -- cgit v1.2.3