spiegel-keyman/developer
Marc Durdin 59f02a6a55 fix(developer): retrieve debug memo anchor without side effects
Use RichEdit's `ITextDocument` interface to retrieve the selection
anchor/caret information, and avoid the side-effects that can arise with
the hacky `EM_GETSEL` / `EM_SETSEL` pattern we used previously.

Changing the selection with `EM_SETSEL` in order to find the anchor
point causes notification messages to be generated that can arrive at an
unexpected time in some text selection scenarios, which ended up with us
having a saved selection in the debugger pointing to the wrong text
range.

The name `Anchor` was a misnomer, because it was actually returning the
caret position, not the anchor for the selection, which is the far side
of the selection from the anchor!

Fixes: #11706
Fixes: KEYMAN-DEVELOPER-18A
2026-03-04 14:01:42 +01:00
..
config feat(developer): add api-extractor and api-documenter and config 2024-02-26 11:37:32 +07:00
docs Update link to PrimerPrep in step-3.md 2026-01-13 17:40:33 -05:00
src fix(developer): retrieve debug memo anchor without side effects 2026-03-04 14:01:42 +01:00
.gitignore chore(developer): move server with no changes 2022-05-23 12:15:34 +10:00
build.sh maint(common): consolidate builder scripts 2025-08-02 08:11:24 +10:00