aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/qreg-commands.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-08-31 23:01:42 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-09 18:22:21 +0200
commitb146ccd7a7513b910affd86848c704d600df3090 (patch)
tree5c9e2f65d43aee57c8fc0e9e2616754781857276 /src/qreg-commands.c
parentdb5ab171995bded490c65ed299c9ff066c41c413 (diff)
downloadsciteco-b146ccd7a7513b910affd86848c704d600df3090.tar.gz
avoid redunancies between teco_qreg_plain_get_character() and teco_state_start_get() (refs #5)
Diffstat (limited to 'src/qreg-commands.c')
-rw-r--r--src/qreg-commands.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qreg-commands.c b/src/qreg-commands.c
index d7bfafe..09b2b90 100644
--- a/src/qreg-commands.c
+++ b/src/qreg-commands.c
@@ -310,8 +310,10 @@ teco_state_queryqreg_got_register(teco_machine_main_t *ctx, teco_qreg_t *qreg,
* Positions are handled like buffer positions \(em they
* begin at 0 up to the length of the string minus 1.
* An error is thrown for invalid positions.
- * If <q> is Unicode-encoded, -1 or -2 could be returned for
- * invalid byte sequences.
+ * If <q> is encoded as UTF-8 and there is
+ * an incomplete sequence at the requested position,
+ * -1 is returned.
+ * All other invalid Unicode sequences are returned as -2.
* Both non-colon-modified forms of Q require register <q>
* to be defined and fail otherwise.
*