1) Horizontal movement and selection commands. Bound to the cursor Left, Right, Home, End, ‘\’, and ‘/' keys in conjunction with various combinations of modifier keys. Some are not bound by default or may be bound by the application in different modes such as wrap.aware.home.end.keys in SciTE.
Controlled with SCMS_MULTISELECT_MOVEH flag.
The commands are: SCI_CHARLEFT, SCI_CHARLEFTEXTEND, SCI_CHARRIGHT, SCI_CHARRIGHTEXTEND, SCI_WORDLEFT, SCI_WORDLEFTEXTEND, SCI_WORDRIGHT, SCI_WORDRIGHTEXTEND, SCI_WORDLEFTEND, SCI_WORDLEFTENDEXTEND, SCI_WORDRIGHTEND, SCI_WORDRIGHTENDEXTEND, SCI_WORDPARTLEFT, SCI_WORDPARTLEFTEXTEND, SCI_WORDPARTRIGHT, SCI_WORDPARTRIGHTEXTEND, SCI_HOME, SCI_HOMEEXTEND, SCI_HOMEDISPLAY, SCI_HOMEDISPLAYEXTEND, SCI_HOMEWRAP, SCI_HOMEWRAPEXTEND, SCI_VCHOME, SCI_VCHOMEEXTEND, SCI_VCHOMEDISPLAY, SCI_VCHOMEDISPLAYEXTEND, SCI_VCHOMEWRAP, SCI_VCHOMEWRAPEXTEND, SCI_LINEEND, SCI_LINEENDEXTEND, SCI_LINEENDDISPLAY, SCI_LINEENDDISPLAYEXTEND, SCI_LINEENDWRAP, SCI_LINEENDWRAPEXTEND.
The patch also reimplements some rectangular commands but these just switch to rectangular mode: SCI_CHARLEFTRECTEXTEND, SCI_CHARRIGHTRECTEXTEND, SCI_HOMERECTEXTEND, SCI_VCHOMERECTEXTEND, SCI_LINEENDRECTEXTEND.
2) Word and line deletion commands. Bound to Backspace and Delete keys in conjunction with Ctrl and with or without Shift.
Controlled with SCMS_MULTISELECT_DELETEWORDLINE flag.
The commands are: SCI_DELWORDLEFT, SCI_DELWORDRIGHT, SCI_DELWORDRIGHTEND (not bound by default), SCI_DELLINELEFT, SCI_DELLINERIGHT.
3) Line up/down movement and selection commands. Bound to the cursor Up and Down keys with or without Shift.
Controlled with SCMS_MULTISELECT_MOVEV flag.
The commands are: SCI_LINEDOWN, SCI_LINEDOWNEXTEND, SCI_LINEUP, SCI_LINEUPEXTEND.
The patch also reimplements some rectangular commands: SCI_LINEDOWNRECTEXTEND and SCI_LINEUPRECTEXTEND.
Line up and down actions are likely to merge carets on one line when they move to an empty line. Only the main caret has a lastXChosen value that it will spring back to. While the selection data could include a lastXChosen value for each caret, this is a large change which I will not be working on for now. The current implementation may be worthwhile when virtual space is turned on or when the vertical movement is short and over lines of similar length.
Other vertical movement keys do not support multiple cursors. It does not seem useful to me to support movement of multiple cursors over large vertical distances. If others want to produce implementations then they may be included.
A new setting MultipleSelectionOptions determines which of these work. All are turned on by default in the patch. This was done since some applications have constructed their own multiple selection functionality which may break if these were on by default. It would be simpler if MultipleSelectionOptions were not needed or could be simplified to a single boolean. Please speak up if you need this degree of control. If you don’t have multiple selection turned on then none of these will be active.
This is a large patch which changes how selections and related actions are performed. It is very likely there are bugs. Watch out for problems like overlapping selections: in Scintilla’s model of multiple selection, selections should never overlap. There are many functions associated with selection movement including correct and minimal redrawing, scrolling when needed, primary selection claiming on Unix/X, and reporting the movement to the application. Report if any of these behaviours have stopped working.
The patch is against current Hg and depends on recent changes in Hg.
This change set has not been committed to Mercurial.
The Mercurial repositories are:
This change is also available from
Neil