Skip to content

Commit

Permalink
fix(developer): handle KM_CORE_IT_INVALIDATE_CONTEXT in debugger
Browse files Browse the repository at this point in the history
The output from Keyman Core changed in #11172 to emit a
`KM_CORE_IT_INVALIDATE_CONTEXT` action when a frame key is pressed, but
the debugger was not catering for this scenario, causing an assertion
failure.

Fixes: #11486
Fixes: KEYMAN-DEVELOPER-1Y4
  • Loading branch information
mcdurdin committed May 21, 2024
1 parent 19b997b commit 1969319
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions developer/src/tike/debug/Keyman.System.Debug.DebugEvent.pas
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ function TDebugEventList.AddStateItems(

AddDebugItem(debug, debugkeyboard, vk, modifier_state);

if action._type = KM_CORE_IT_INVALIDATE_CONTEXT then
begin
// We always ignore invalidate context which can come when a frame key is
// pressed (#11172, #11486)
Inc(action);
end;

if action._type = KM_CORE_IT_EMIT_KEYSTROKE then
begin
// The EMIT_KEYSTROKE action comes after all rules have completed processing
Expand Down

0 comments on commit 1969319

Please sign in to comment.