diff options
Diffstat (limited to 'src/qreg-commands.c')
-rw-r--r-- | src/qreg-commands.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qreg-commands.c b/src/qreg-commands.c index 41e4465..f8bb4cb 100644 --- a/src/qreg-commands.c +++ b/src/qreg-commands.c @@ -29,6 +29,7 @@ #include "interface.h" #include "ring.h" #include "parser.h" +#include "cmdline.h" #include "core-commands.h" #include "qreg.h" #include "qreg-commands.h" @@ -492,8 +493,11 @@ teco_state_setqregstring_building_initial(teco_machine_main_t *ctx, GError **err /* * The expected codepage of string building constructs is determined * by the Q-Register. + * + * NOTE: This is not safe to undo in macro calls. */ - teco_undo_guint(ctx->expectstring.machine.codepage); + if (ctx == &teco_cmdline.machine) + teco_undo_guint(ctx->expectstring.machine.codepage); return qreg->vtable->get_string(qreg, NULL, NULL, &ctx->expectstring.machine.codepage, error); } |