aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core-commands.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-30 20:38:57 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-30 20:51:39 +0300
commite82dc6639e829490cb11267fa4a49ef97c6459ae (patch)
tree7625e231f06a47c0bcbb79b64f2a5c6bab811498 /src/core-commands.c
parent2070d7faf66425c72677c02616a087d30a9aa863 (diff)
downloadsciteco-e82dc6639e829490cb11267fa4a49ef97c6459ae.tar.gz
the computed go-to command (O) is now 0-indexed and all invalid indexes and empty labels are ignored
* This has long been a TECO-11 incompatibility. * The first label in a list has index 0, i.e. `1Ofoo,bar$` jumps to label `!bar!`. Consequently 0 is also implied, so `Olabel$` continues to do what you expect. * `0Ofoo$` was previously also jumping to `!foo!` which was inconsistent: All invalid indexes should do nothing, i.e. execution continues after the go-to command. * Fixed handling of empty labels as in `1Ofoo,,bar$` - execution should also continue after the command. This eases writing "default" clauses immediately after the go-to. * The ED hook values now also begin at 0, so most existing ED hook macros should continue to work. * Similarily, the mouse events returned by -EJ also begin at 0 now, so fnkeys.tes continues to work as expected. * It's still very possible of course that this breaks existing code.
Diffstat (limited to 'src/core-commands.c')
-rw-r--r--src/core-commands.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core-commands.c b/src/core-commands.c
index 6d0a3dc..5fe960b 100644
--- a/src/core-commands.c
+++ b/src/core-commands.c
@@ -2142,13 +2142,13 @@ teco_state_ecommand_flags(teco_machine_main_t *ctx, GError **error)
* Type of the last mouse event (\fBread-only\fP).
* One of the following values will be returned:
* .RS
- * . IP 1: 4
+ * . IP 0: 4
* Some button has been pressed
- * . IP 2:
+ * . IP 1:
* Some button has been released
- * . IP 3:
+ * . IP 2:
* Scroll up
- * . IP 4:
+ * . IP 3:
* Scroll down
* .RE
* .IP -2: