From 427092d2c8ee11b4a56eb50dbf68861f10f2a81f Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 27 Oct 2024 19:51:10 +0300 Subject: fixed rubbing out <:Xq>, <:^Uq> and other append-to-register operations * This was a regression introduced in 41ab5cf0289dab60ac1ddc97cf9680ee2468ea6c, which changed the semantics of teco_doc_undo_set_string(). * Removed undo_append_string() Q-Reg virtual method. append_string() now does its own undo token emission, so that we can defer the teco_doc_undo_edit() after the point that the document was initialized. This is important, so that we can configure the default encoding on new registers. --- src/qreg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qreg.h') diff --git a/src/qreg.h b/src/qreg.h index f5866e7..59cf2cc 100644 --- a/src/qreg.h +++ b/src/qreg.h @@ -52,8 +52,9 @@ typedef const struct { gboolean (*set_string)(teco_qreg_t *qreg, const gchar *str, gsize len, guint codepage, GError **error); gboolean (*undo_set_string)(teco_qreg_t *qreg, GError **error); + + /* does not need an explicit undo-call */ gboolean (*append_string)(teco_qreg_t *qreg, const gchar *str, gsize len, GError **error); - gboolean (*undo_append_string)(teco_qreg_t *qreg, GError **error); gboolean (*get_string)(teco_qreg_t *qreg, gchar **str, gsize *len, guint *codepage, GError **error); -- cgit v1.2.3