mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-19 22:27:39 +00:00
fix(core): clear core context on invalidate cache
This commit is contained in:
parent
83e21333c6
commit
4a511bde1e
6 changed files with 28 additions and 1 deletions
|
|
@ -323,5 +323,12 @@
|
|||
<FileVersion>1.0</FileVersion>
|
||||
<FileType>.kmn</FileType>
|
||||
</File>
|
||||
<File>
|
||||
<ID>id_k_049___context_and_invalidate</ID>
|
||||
<Filename>k_049___context_and_invalidate.kmn</Filename>
|
||||
<Filepath>k_049___context_and_invalidate.kmn</Filepath>
|
||||
<FileVersion>1.0</FileVersion>
|
||||
<FileType>.kmn</FileType>
|
||||
</File>
|
||||
</Files>
|
||||
</KeymanDeveloperProject>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
store(&NAME) '049 - context and invalidate'
|
||||
c Description: Tests that core context is cleared when invalidated See #10182.
|
||||
c keys: [K_A][K_B][K_ENTER][K_C]
|
||||
c expected: c
|
||||
c context:
|
||||
|
||||
store(&version) '10.0'
|
||||
|
||||
begin Unicode > use(Main)
|
||||
|
||||
group(Main) using keys
|
||||
|
||||
c Test if context was not invalidated by [K_ENTER] context will be 'abd'
|
||||
|
||||
'a' 'b' + [K_C] > 'abd'
|
||||
|
||||
Binary file not shown.
|
|
@ -247,6 +247,7 @@ kmx_processor::internal_process_queued_actions(km_core_state *state) {
|
|||
}
|
||||
break;
|
||||
case QIT_INVALIDATECONTEXT:
|
||||
state->context().clear();
|
||||
state->actions().push_invalidate_context();
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -147,6 +147,8 @@ apply_action(
|
|||
}
|
||||
} break;
|
||||
case KM_CORE_IT_INVALIDATE_CONTEXT:
|
||||
context.clear();
|
||||
text_store.clear();
|
||||
std::cout << "action: context invalidated (markers cleared)" << std::endl;
|
||||
break;
|
||||
case KM_CORE_IT_EMIT_KEYSTROKE:
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ tests = [
|
|||
'k_045___deadkey_and_context',
|
||||
'k_046___deadkey_and_contextex',
|
||||
'k_047___caps_always_off_initially_on',
|
||||
'k_048___modifier_keys_keep_context'
|
||||
'k_048___modifier_keys_keep_context',
|
||||
'k_049___context_and_invalidate'
|
||||
]
|
||||
|
||||
node = find_program('node', required: true)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue