From 5d4368584ecd447b953e8853dbeaee4282700970 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 18 Jul 2025 01:41:28 +0300 Subject: support <:]q> (pop Q-Register) for getting a success/failure boolean * Could be used to check whether the stack is currently empty, although peeking would be cumbersome: `:]q"S [q !...! | !...! '` * This is from DEC TECO-11. --- src/core-commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core-commands.c') diff --git a/src/core-commands.c b/src/core-commands.c index 8e31ae3..ae51ecc 100644 --- a/src/core-commands.c +++ b/src/core-commands.c @@ -639,7 +639,8 @@ teco_state_start_input(teco_machine_main_t *ctx, gunichar chr, GError **error) .modifier_at = TRUE, .modifier_colon = 1}, ['['] = {&teco_state_pushqreg}, - [']'] = {&teco_state_popqreg}, + [']'] = {&teco_state_popqreg, + .modifier_colon = 1}, ['G'] = {&teco_state_getqregstring}, ['Q'] = {&teco_state_queryqreg, .modifier_colon = 1}, -- cgit v1.2.3