aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core-commands.c')
-rw-r--r--src/core-commands.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core-commands.c b/src/core-commands.c
index befb6e8..0cde7e0 100644
--- a/src/core-commands.c
+++ b/src/core-commands.c
@@ -2759,12 +2759,9 @@ teco_state_insert_initial(teco_machine_main_t *ctx, GError **error)
/*
* Current document's encoding determines the behaviour of
* string building constructs.
- *
- * NOTE: This is not safe to undo in macro calls.
*/
- if (ctx == &teco_cmdline.machine)
- teco_undo_guint(ctx->expectstring.machine.codepage);
- ctx->expectstring.machine.codepage = teco_interface_get_codepage();
+ teco_machine_stringbuilding_set_codepage(&ctx->expectstring.machine,
+ teco_interface_get_codepage());
if (!teco_expressions_eval(FALSE, error))
return FALSE;