diff options
author | Mitchell Foral <unknown> | 2017-11-20 12:24:51 +1100 |
---|---|---|
committer | Mitchell Foral <unknown> | 2017-11-20 12:24:51 +1100 |
commit | 767e31bb1fb118e8a58da4fd9f1fa133e066caa1 (patch) | |
tree | 776b987950ac1cc427fb5418fb44022dd89e73ad | |
parent | 7d91d5d928acc050a0aca92ed1a20753b43449d7 (diff) | |
download | scintilla-mirror-767e31bb1fb118e8a58da4fd9f1fa133e066caa1.tar.gz |
Backport: Add SCI_GETMOVEEXTENDSSELECTION.
Backport of changeset 6418:85205da6ec1b.
-rw-r--r-- | doc/ScintillaDoc.html | 5 | ||||
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | include/Scintilla.h | 1 | ||||
-rw-r--r-- | include/Scintilla.iface | 3 | ||||
-rw-r--r-- | src/Editor.cxx | 2 |
5 files changed, 15 insertions, 0 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 42242c606..df08b19da 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -1220,6 +1220,7 @@ struct Sci_TextToFind { <a class="message" href="#SCI_SELECTIONISRECTANGLE">SCI_SELECTIONISRECTANGLE → bool</a><br /> <a class="message" href="#SCI_SETSELECTIONMODE">SCI_SETSELECTIONMODE(int selectionMode)</a><br /> <a class="message" href="#SCI_GETSELECTIONMODE">SCI_GETSELECTIONMODE → int</a><br /> + <a class="message" href="#SCI_GETMOVEEXTENDSSELECTION">SCI_GETMOVEEXTENDSSELECTION → bool</a><br /> <a class="message" href="#SCI_GETLINESELSTARTPOSITION">SCI_GETLINESELSTARTPOSITION(int line) → position</a><br /> <a class="message" href="#SCI_GETLINESELENDPOSITION">SCI_GETLINESELENDPOSITION(int line) → position</a><br /> <a class="message" href="#SCI_MOVECARETINSIDEVIEW">SCI_MOVECARETINSIDEVIEW</a><br /> @@ -1423,6 +1424,10 @@ struct Sci_TextToFind { <code>SC_SEL_THIN</code> is the mode after a rectangular selection has been typed into and ensures that no characters are selected.</p> + <p><b id="SCI_GETMOVEEXTENDSSELECTION">SCI_GETMOVEEXTENDSSELECTION → bool</b><br /> + This returns 1 if regular caret moves will extend or reduce the selection, 0 if not. + <code>SCI_SETSELECTIONMODE</code> toggles this setting between on and off.</p> + <p><b id="SCI_GETLINESELSTARTPOSITION">SCI_GETLINESELSTARTPOSITION(int line) → position</b><br /> <b id="SCI_GETLINESELENDPOSITION">SCI_GETLINESELENDPOSITION(int line) → position</b><br /> 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 88c0c8cbb..7de16f4df 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -565,6 +565,10 @@ The Scintilla namespace is always active for internal symbols and for the lexer and document interfaces. </li> <li> + Add SCI_GETMOVEEXTENDSSELECTION to allow applications to add more + complex selection commands. + </li> + <li> Fix HTML lexer handling of Django so that nesting a {{ }} or {% %} Django tag inside of a {# #} Django comment does not break highlighting of rest of file </li> diff --git a/include/Scintilla.h b/include/Scintilla.h index be858af7c..6039f30d8 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -760,6 +760,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 6a23999d7..0af6c211a 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1971,6 +1971,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 80b1d7ad3..8125d322b 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7623,6 +7623,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( |