aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/qreg-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qreg-commands.c')
-rw-r--r--src/qreg-commands.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qreg-commands.c b/src/qreg-commands.c
index cff4c84..5b80d15 100644
--- a/src/qreg-commands.c
+++ b/src/qreg-commands.c
@@ -658,8 +658,8 @@ teco_state_macro_got_register(teco_machine_main_t *ctx, teco_qreg_t *qreg,
if (!teco_qreg_execute(qreg, &table, error))
return NULL;
- if (teco_qreg_current && !teco_qreg_current->must_undo) {
- /* currently editing local Q-Register */
+ if (teco_qreg_table_current == &table) {
+ /* currently editing local Q-Register that's about to be freed */
teco_error_editinglocalqreg_set(error, teco_qreg_current->head.name.data,
teco_qreg_current->head.name.len);
return NULL;