From 2ec568579823c991b919fa3a2c8583a8db21cb81 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 30 Jul 2025 23:58:32 +0300 Subject: implemented ^T command: allows typing by code and getting characters from stdin or the user * n:^T always prints bytes (cf. :^A) * ^T without arguments returns a codepoint or byte from stdin. In interactive mode, this currentply places a cursor in the message line and waits for a keypress. --- src/core-commands.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core-commands.c') diff --git a/src/core-commands.c b/src/core-commands.c index 015865d..213d9ed 100644 --- a/src/core-commands.c +++ b/src/core-commands.c @@ -1628,7 +1628,9 @@ teco_state_control_input(teco_machine_main_t *ctx, gunichar chr, GError **error) .modifier_colon = 1}, ['X'] = {&teco_state_start, teco_state_control_search_mode}, ['Y'] = {&teco_state_start, teco_state_control_last_range}, - ['S'] = {&teco_state_start, teco_state_control_last_length} + ['S'] = {&teco_state_start, teco_state_control_last_length}, + ['T'] = {&teco_state_start, teco_state_control_typeout, + .modifier_colon = 1} }; /* -- cgit v1.2.3