diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2025-12-26 01:04:11 +0100 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2025-12-26 01:04:11 +0100 |
| commit | d7330f252e6b0a1326eac6b5fc0b219a7b706eb7 (patch) | |
| tree | c688a7d2ef1fbfe92dee90dc78e3fbaa671ecd89 /src/core-commands.h | |
| parent | 44166f53d5923be4685a69b85166ada40dc1cc10 (diff) | |
TECO_DEFINE_STATE_INSERT() no longer generates a done_cbHEADmaster-fmsbw-cimaster
This made problems in teco_state_replace_default_insert, where we had to
override the done_cb.
Perhaps we should avoid all generated callback names (ie. mandatory
callback implementations)?
Diffstat (limited to 'src/core-commands.h')
| -rw-r--r-- | src/core-commands.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core-commands.h b/src/core-commands.h index 4cc8747..8f8966f 100644 --- a/src/core-commands.h +++ b/src/core-commands.h @@ -88,14 +88,9 @@ gboolean teco_state_insert_process_edit_cmd(teco_machine_main_t *ctx, teco_machi * @ingroup states * * @note Also serves as a base class of the replace-insertion commands. - * @fixme Generating the done_cb could be avoided if there simply were a default. + * @note You must always define a done_cb(). */ #define TECO_DEFINE_STATE_INSERT(NAME, ...) \ - static teco_state_t * \ - NAME##_done(teco_machine_main_t *ctx, const teco_string_t *str, GError **error) \ - { \ - return teco_state_insert_done(ctx, str, error); \ - } \ TECO_DEFINE_STATE_EXPECTSTRING(NAME, \ .initial_cb = (teco_state_initial_cb_t)teco_state_insert_initial, \ .process_edit_cmd_cb = (teco_state_process_edit_cmd_cb_t)teco_state_insert_process_edit_cmd, \ @@ -103,7 +98,7 @@ gboolean teco_state_insert_process_edit_cmd(teco_machine_main_t *ctx, teco_machi ##__VA_ARGS__ \ ) -TECO_DECLARE_STATE(teco_state_insert_plain); +TECO_DECLARE_STATE(teco_state_insert); TECO_DECLARE_STATE(teco_state_insert_indent); /** |
