spiegel-keyman/developer
Marc Durdin 507dc7a749 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-06 12:26:50 +01:00
..
config feat(developer): add api-extractor and api-documenter and config 2024-02-26 11:37:32 +07:00
docs chore: update primerprep link 2026-01-19 13:52:27 +07:00
src fix(developer): retrieve debug memo anchor without side effects 2026-03-06 12:26:50 +01:00
.gitignore chore(developer): move server with no changes 2022-05-23 12:15:34 +10:00
build.sh chore(developer): use builder.inc.sh instead of build-utils.sh in build scripts 2024-05-20 06:34:46 +07:00