aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cmdline.c
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-09-25 01:43:56 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-09-25 01:43:56 +0200
commite371b5fc710c597e175e6b7d7645b3a224a731a1 (patch)
tree3861fa4949adfd1c95a06ae0b7dd41c4167a3b7a /src/cmdline.c
parent207af96f4eb3220534ea06c2e107517372246544 (diff)
instead of relying on Scintilla undo actions, use SciTECO undo tokens exclusivelyHEADmaster-fmsbw-cimaster
Previously we were using both Scintilla undo actions and our own undo tokens and both had to be coordinated via `undo__teco_interface_ssm(SCI_UNDO, 0, 0)`. This was error prone since we have to predict when an undo action is actually generated. Furthermore, you had to update SCI_SETUNDOCOLLECTION on all buffers and the Q-Reg view whenever switching to and from interactive mode. Also, this probably wasted memory for the doubled undo bookkeeping. Now, we always set SCI_SETUNDOCOLLECTION(FALSE), even in interactive mode. teco_undo_view_insert() was introduced to undo text deletions. While this saves almost no lines of code, it's just a clearer and simpler architecture.
Diffstat (limited to 'src/cmdline.c')
-rw-r--r--src/cmdline.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/cmdline.c b/src/cmdline.c
index d2d9d04..99bc802 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -382,9 +382,6 @@ teco_cmdline_keypress(const gchar *data, gsize len, GError **error)
}
teco_undo_clear();
- /* also empties all Scintilla undo buffers */
- teco_ring_set_scintilla_undo(TRUE);
- teco_view_set_scintilla_undo(teco_qreg_view, TRUE);
/*
* FIXME: Reset main machine?
*/