diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-10-29 16:08:45 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-10-29 16:08:45 +0300 |
commit | 6d882a3fdd5b35181b301a2b1db32908c2b7953a (patch) | |
tree | 6e17828a6f31582428b051047e744839cae1cd94 /src | |
parent | 2b6342cbb3e0c89bcd81c143c88a43ece55bc9db (diff) | |
download | sciteco-6d882a3fdd5b35181b301a2b1db32908c2b7953a.tar.gz |
fixed <N> (search all) crashes before invocations of <S> (closes #26)
* There was some boilerplate code missing in teco_state_search_all_initial(),
that is present in teco_state_search_initial().
* Perhaps there should be a common function to avoid redundancies?
* This will also fix the initialization of the string argument codepage for <N>.
Diffstat (limited to 'src')
-rw-r--r-- | src/search.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/search.c b/src/search.c index 0d04895..14a8540 100644 --- a/src/search.c +++ b/src/search.c @@ -830,6 +830,13 @@ teco_state_search_all_initial(teco_machine_main_t *ctx, GError **error) if (ctx->mode > TECO_MODE_NORMAL) return TRUE; + teco_machine_stringbuilding_set_codepage(&ctx->expectstring.machine, + teco_interface_get_codepage()); + + if (G_UNLIKELY(!teco_search_qreg_machine)) + teco_search_qreg_machine = teco_machine_qregspec_new(TECO_QREG_REQUIRED, ctx->qreg_table_locals, + ctx->parent.must_undo); + teco_undo_object_parameters_push(&teco_search_parameters); teco_search_parameters.dot = teco_interface_ssm(SCI_GETCURRENTPOS, 0, 0); |