diff options
author | Colomban Wendling <ban@herbesfolles.org> | 2012-08-26 14:18:30 +0200 |
---|---|---|
committer | Colomban Wendling <ban@herbesfolles.org> | 2012-08-26 14:18:30 +0200 |
commit | 6783c288d92d91660afa83aef636c17d8dd7c64a (patch) | |
tree | 2e30c937676316d67e5f079d08f16adacfd6135b /src/Editor.cxx | |
parent | 4b38afdf9de9878fe3060871c11d26fa4f18a009 (diff) | |
download | scintilla-mirror-6783c288d92d91660afa83aef636c17d8dd7c64a.tar.gz |
Add SCI_VCHOMEDISPLAYEXTEND keyboard command
This is like SCI_VCHOMEDISPLAY but extending the selection.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 12 |
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: |