aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorColomban Wendling <ban@herbesfolles.org>2012-08-26 14:18:30 +0200
committerColomban Wendling <ban@herbesfolles.org>2012-08-26 14:18:30 +0200
commit6783c288d92d91660afa83aef636c17d8dd7c64a (patch)
tree2e30c937676316d67e5f079d08f16adacfd6135b /src
parent4b38afdf9de9878fe3060871c11d26fa4f18a009 (diff)
downloadscintilla-mirror-6783c288d92d91660afa83aef636c17d8dd7c64a.tar.gz
Add SCI_VCHOMEDISPLAYEXTEND keyboard command
This is like SCI_VCHOMEDISPLAY but extending the selection.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index eb616389f..17b899d87 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -4765,6 +4765,7 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lPar
case SCI_VCHOMEWRAP:
case SCI_VCHOMEWRAPEXTEND:
case SCI_VCHOMEDISPLAY:
+ case SCI_VCHOMEDISPLAYEXTEND:
case SCI_DELWORDLEFT:
case SCI_DELWORDRIGHT:
case SCI_DELWORDRIGHTEND:
@@ -5574,6 +5575,16 @@ int Editor::KeyCommand(unsigned int iMessage) {
StartEndDisplayLine(sel.MainCaret(), true), -1), Selection::selStream);
SetLastXChosen();
break;
+ case SCI_VCHOMEDISPLAYEXTEND: {
+ SelectionPosition homePos = SelectionPosition(pdoc->VCHomePosition(sel.MainCaret()));
+ SelectionPosition viewLineStart = MovePositionSoVisible(StartEndDisplayLine(sel.MainCaret(), true), -1);
+ if (viewLineStart > homePos)
+ homePos = viewLineStart;
+
+ MovePositionTo(homePos, Selection::selStream);
+ SetLastXChosen();
+ }
+ break;
case SCI_LINEENDDISPLAY:
MovePositionTo(MovePositionSoVisible(
StartEndDisplayLine(sel.MainCaret(), false), 1));
@@ -8660,6 +8671,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_VCHOMEWRAP:
case SCI_VCHOMEWRAPEXTEND:
case SCI_VCHOMEDISPLAY:
+ case SCI_VCHOMEDISPLAYEXTEND:
case SCI_ZOOMIN:
case SCI_ZOOMOUT:
case SCI_DELWORDLEFT: