diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-11-22 16:53:08 +0100 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-11-22 19:51:04 +0100 |
| commit | 910d8a61772570198eb12f752c5b7f8fcd006dc2 (patch) | |
| tree | 13fcd9805c3a82e8b39691a1e6b5d2e81662f784 /src/core-commands.c | |
| parent | b283996b6ecffc3a1d05c52df02c89ec86cafa96 (diff) | |
implemented the FQq (free Q-register) command and extended EF
Since Q-registers can be dynamically allocated, we must have
a command for freeing them as well. This is especially important
when using long Q-register names to implement arrays and other complex
data structures. To ease freeing entire arrays, the :FQ[array.]
modification can be used -- this will free all registers with the given
prefix efficiently.
There is currently no variant that tells you whether the register
actually existed -- you can first check with :Qq if that is important.
EF has also been extended to free the currently edited register -
which is also what Video TECO appeared to do.
If the currently edited register is freed, we edit the current
buffer again.
Diffstat (limited to 'src/core-commands.c')
| -rw-r--r-- | src/core-commands.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core-commands.c b/src/core-commands.c index f7e6f01..786cbd7 100644 --- a/src/core-commands.c +++ b/src/core-commands.c @@ -898,6 +898,8 @@ teco_state_fcommand_input(teco_machine_main_t *ctx, gunichar chr, GError **error .modifier_at = TRUE, .modifier_colon = 1}, ['G'] = {&teco_state_changedir, .modifier_at = TRUE}, + ['Q'] = {&teco_state_freeqreg, + .modifier_colon = 1}, /* * Loop Flow Control |
