From 5a9f941bc10507eab2e352978bd7f35ca26920dc Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 14 May 2016 10:32:49 +1000 Subject: Post a caret moved accessibility event in Editor::MovedCaret so that screen readers like NVDA will speak when extending the selection with a Shift+Down key combination scrolls but does not move the caret position relative to the screen. --- src/Editor.cxx | 4 ++++ src/Editor.h | 1 + 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 9a41bab09..125399622 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -828,6 +828,7 @@ void Editor::MovedCaret(SelectionPosition newPos, SelectionPosition previousPos, } ShowCaretAtCurrentPosition(); + NotifyCaretMove(); ClaimSelection(); SetHoverIndicatorPosition(sel.MainCaret()); @@ -1437,6 +1438,9 @@ void Editor::InvalidateCaret() { UpdateSystemCaret(); } +void Editor::NotifyCaretMove() { +} + void Editor::UpdateSystemCaret() { } diff --git a/src/Editor.h b/src/Editor.h index c1545d34b..93a86fa39 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -365,6 +365,7 @@ protected: // ScintillaBase subclass needs access to much of Editor void DropCaret(); void CaretSetPeriod(int period); void InvalidateCaret(); + virtual void NotifyCaretMove(); virtual void UpdateSystemCaret(); bool Wrapping() const; -- cgit v1.2.3