aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2013-08-20 14:57:56 +1000
committerNeil <nyamatongwe@gmail.com>2013-08-20 14:57:56 +1000
commit8e6ddfd4ed7a72190796d138557ad3eb5da7b0db (patch)
tree81cf58c90f2b00769277afbe15469d96265b6840 /src
parentd56cc851daf142c43499ede308ac741ec3294d04 (diff)
downloadscintilla-mirror-8e6ddfd4ed7a72190796d138557ad3eb5da7b0db.tar.gz
Added PositionRelative to optimize navigation by character.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 7fa1326a7..afc2983ed 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7605,6 +7605,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_POSITIONAFTER:
return pdoc->MovePositionOutsideChar(wParam + 1, 1, true);
+ case SCI_POSITIONRELATIVE:
+ return Platform::Clamp(pdoc->GetRelativePosition(wParam, lParam), 0, pdoc->Length());
+
case SCI_LINESCROLL:
ScrollTo(topLine + lParam);
HorizontalScrollTo(xOffset + static_cast<int>(wParam) * vs.spaceWidth);