aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index abfa947f0..d55b88095 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3320,12 +3320,34 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
case SCI_GETCHARAT:
return pdoc->CharAt(wParam);
+ case SCI_SETCURRENTPOS:
+ SetSelection(wParam, anchor);
+ break;
+
case SCI_GETCURRENTPOS:
return currentPos;
+ case SCI_SETANCHOR:
+ SetSelection(currentPos, wParam);
+ break;
+
case SCI_GETANCHOR:
return anchor;
+ case SCI_SETSELECTIONSTART:
+ SetSelection(Platform::Maximum(currentPos, wParam), wParam);
+ break;
+
+ case SCI_GETSELECTIONSTART:
+ return Platform::Minimum(anchor, currentPos);
+
+ case SCI_SETSELECTIONEND:
+ SetSelection(wParam, Platform::Minimum(anchor, wParam));
+ break;
+
+ case SCI_GETSELECTIONEND:
+ return Platform::Maximum(anchor, currentPos);
+
case SCI_GETSTYLEAT:
if (static_cast<short>(wParam) >= pdoc->Length())
return 0;
@@ -3387,10 +3409,6 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
Redraw();
break;
- case SCI_SETANCHOR:
- SetSelection(currentPos, wParam);
- break;
-
case SCI_GETCURLINE: {
if (lParam == 0)
return 0;