spiegel-keyman/developer/src/common/delphi
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
..
components fix(developer): retrieve debug memo anchor without side effects 2026-03-04 14:01:42 +01:00
general fix(developer): support &displayMap font in web debugger 2025-01-17 11:03:20 +07:00
keyboards chore(windows): move Delphi developer units to developer 2022-06-12 15:38:19 +10:00
lexicalmodels feat(developer): clarify project id format for kmc-copy UI 2025-01-31 11:01:40 +07:00
packages fix(developer): remove package version if FollowKeyboardVersion is set in Package Editor 2025-11-03 10:54:44 +01:00
build.sh maint(common): consolidate builder scripts 2025-08-02 08:11:24 +10:00