From aaa1d51a4c85fcc627e88ef7cf5292d9c5f5f840 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 8 Jun 2025 20:54:29 +0200 Subject: ^S/^Y calculates the glyph offsets earlier * Previously, deleting text after a text match or insertion could result in wrong ^S/^Y results. In particular, the amount of characters deleted by at the end of a buffer couldn't be queried. * This also fixes the M#rf (reflow paragraph) macro. --- tests/testsuite.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/testsuite.at b/tests/testsuite.at index 8155ce4..96d4978 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -211,8 +211,10 @@ TE_CHECK([[@I/XYZ/J @EB/foo/ @I/XZY/J @:FN/Z/0/"F(0/0)' Q*-2"N(0/0)' AT_CLEANUP AT_SETUP([Search and insertion ranges]) -TE_CHECK([[@I/XXYYZZ/^SC ."N(0/0)' C @S/YY/^YU1U0 Q0-2"N(0/0)' Q1-4"N(0/0)']], 0, ignore, ignore) +# When deleting characters, the result of ^S/^Y must not change. +TE_CHECK([[@I/XXYYZZ/^SC ."N(0/0)' C @S/YY/ HK ^YU1U0 Q0-2"N(0/0)' Q1-4"N(0/0)']], 0, ignore, ignore) TE_CHECK([[@I/XXYYZZ/J @S/XX^E[^EMY]/ 1^YXa :Qa-2"N(0/0)']], 0, ignore, ignore) +TE_CHECK([[@I/XXYYZZ/J @FD/^EMZ/ ^S+2"N(0/0)']], 0, ignore, ignore) AT_CLEANUP AT_SETUP([Editing local registers in macro calls]) -- cgit v1.2.3