From 70acfa623be189df50b42a7402085e782341fec2 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 20 Aug 2013 14:57:56 +1000 Subject: Added PositionRelative to optimize navigation by character. --- src/Editor.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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(wParam) * vs.spaceWidth); -- cgit v1.2.3