aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/qreg-commands.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2022-06-21 03:26:52 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2022-06-21 03:27:54 +0200
commit0d3da2ce68df9f442aa0606361b64bae1dd57811 (patch)
tree451272b26e33039381433f2393b59ec928d55f2c /src/qreg-commands.c
parentd6126b318a55b06a1fde717e92c47bb9b3696708 (diff)
downloadsciteco-0d3da2ce68df9f442aa0606361b64bae1dd57811.tar.gz
avoid unnecessary creation of undo tokens
Diffstat (limited to 'src/qreg-commands.c')
-rw-r--r--src/qreg-commands.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qreg-commands.c b/src/qreg-commands.c
index 1e1649b..1e4e214 100644
--- a/src/qreg-commands.c
+++ b/src/qreg-commands.c
@@ -490,7 +490,8 @@ teco_state_getqregstring_got_register(teco_machine_main_t *ctx, teco_qreg_t *qre
teco_interface_ssm(SCI_ENDUNDOACTION, 0, 0);
teco_ring_dirtify();
- undo__teco_interface_ssm(SCI_UNDO, 0, 0);
+ if (teco_current_doc_must_undo())
+ undo__teco_interface_ssm(SCI_UNDO, 0, 0);
}
return &teco_state_start;