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
commit70acfa623be189df50b42a7402085e782341fec2 (patch)
tree609f95d4dc215476e240d62bf4ef5b0a12ec0fe4 /src
parente88c427ffcf8731edf9dc0957c28c3e0ec78bda5 (diff)
downloadscintilla-mirror-70acfa623be189df50b42a7402085e782341fec2.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);