aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/qreg.h
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-07-25 02:37:17 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-07-25 02:37:17 +0200
commita53fa85dabdfc2c47ec0c9e6626ddda2379a8e38 (patch)
treeab3dd832cf085efdffcfb99c9b5b0579cb0eb7fd /src/qreg.h
parent685507922b0b75da5935076395a5b1ec1ef58356 (diff)
get rid of teco_qreg_vtable_t::undo_set_integer()master-fmsbw-ci
It was never required as a separate callback/method, but was kept merely for consistency. Since we now call teco_current_doc_set_dot() in teco_qreg_dot_set_integer(), we'd have to split it up into an "undo" method as well. I decided to get rid of the superfluous Q-Reg method instead. It's quite likely we could get rid of the remaining undo_set_string(), undo_exchange_string() and undo_edit() callbacks as well (TODO).
Diffstat (limited to 'src/qreg.h')
-rw-r--r--src/qreg.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qreg.h b/src/qreg.h
index c0f95db..ca35e78 100644
--- a/src/qreg.h
+++ b/src/qreg.h
@@ -47,18 +47,19 @@ extern teco_view_t *teco_qreg_view;
* teco_qreg_set_integer(qreg, 23, error);
*
* But this probably won't work. Perhaps use the X-macro pattern.
+ *
+ * FIXME: We can probably get rid of all the separate undo callbacks/methods.
*/
typedef const struct {
+ /* already pushes undo tokens */
gboolean (*set_integer)(teco_qreg_t *qreg, teco_int_t value, GError **error);
- /** @fixme We don't appear to need this as a separate callback */
- gboolean (*undo_set_integer)(teco_qreg_t *qreg, GError **error);
gboolean (*get_integer)(teco_qreg_t *qreg, teco_int_t *ret, GError **error);
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 */
+ /* already pushes undo tokens */
gboolean (*append_string)(teco_qreg_t *qreg, const gchar *str, gsize len, GError **error);
gboolean (*get_string)(teco_qreg_t *qreg, gchar **str, gsize *len,