aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core-commands.c
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-26 01:04:11 +0100
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-26 01:04:11 +0100
commitd7330f252e6b0a1326eac6b5fc0b219a7b706eb7 (patch)
treec688a7d2ef1fbfe92dee90dc78e3fbaa671ecd89 /src/core-commands.c
parent44166f53d5923be4685a69b85166ada40dc1cc10 (diff)
TECO_DEFINE_STATE_INSERT() no longer generates a done_cb
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.c')
-rw-r--r--src/core-commands.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core-commands.c b/src/core-commands.c
index e756eab..faf1c48 100644
--- a/src/core-commands.c
+++ b/src/core-commands.c
@@ -643,7 +643,7 @@ teco_state_start_input(teco_machine_main_t *ctx, gunichar chr, GError **error)
['"'] = {&teco_state_condcommand},
['E'] = {&teco_state_ecommand,
.modifier_at = TRUE, .modifier_colon = 2},
- ['I'] = {&teco_state_insert_plain,
+ ['I'] = {&teco_state_insert,
.modifier_at = TRUE},
['?'] = {&teco_state_help,
.modifier_at = TRUE},
@@ -2962,7 +2962,7 @@ teco_state_insert_done(teco_machine_main_t *ctx, const teco_string_t *str, GErro
* may be better, since it has string building characters
* disabled.
*/
-TECO_DEFINE_STATE_INSERT(teco_state_insert_plain);
+TECO_DEFINE_STATE_INSERT(teco_state_insert);
static gboolean
teco_state_insert_indent_initial(teco_machine_main_t *ctx, GError **error)
@@ -2995,6 +2995,12 @@ teco_state_insert_indent_initial(teco_machine_main_t *ctx, GError **error)
return TRUE;
}
+static teco_state_t *
+teco_state_insert_indent_done(teco_machine_main_t *ctx, const teco_string_t *str, GError **error)
+{
+ return teco_state_insert_done(ctx, str, error);
+}
+
/*
* Alternatives: ^i, ^I, <CTRL/I>, <TAB>
*/