From 8b54d2c31410fcac43c8903007fe0738312834b0 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 14 Oct 2026 01:54:14 +0200 Subject: help topics no longer need to be unique and can be toggled through with the `?$` command. * This mirrors how the `FT$` command toggles through several results. * Some non-unique .SCITECO_TOPICs have been added to sciteco(1) and sciteco(7). * This works by inserting non-unique keys into the help topic RB tree - or rather by turning filename:pos also into keys since rb3ptr does not allow non-unique keys. When searching for a topic, we sort lower than any other entry with the same name. This way we can easily iterate all entries with the same name (search topic). The alternative would have been to maintain a linked list in each and every teco_help_topic_t. * teco_rb3str_auto_complete() now filters out possible duplicate keys. * Updated test case: check for non-unique topic names. --- tests/testsuite.at | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/testsuite.at b/tests/testsuite.at index fef01dc..293bc9b 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -456,15 +456,16 @@ AT_CLEANUP AT_SETUP([Online help]) AT_CHECK([[mkdir -p women]], 0, ignore, ignore) -AT_DATA([women/test.woman], [[ABC +AT_DATA([women/test.woman], [[ABCD ]]) AT_DATA([women/test.woman.tec], [[!*0:A 1:B +3:A *! ]]) -AT_CHECK([[SCITECOPATH=. $SCITECO -e '@?/A/ 0A-^^A"N(0/0)F" @?/B/ 0A-^^B"N(0/0)F"']], 0, ignore, ignore) -# This used to crash: -TE_CHECK([[@?//]], 1, ignore, ignore) +# @?// also used to crash. +# It now toggles through all results for a given topic. +AT_CHECK([[SCITECOPATH=. $SCITECO -e '@?/A/ 0A-^^A"N(0/0)F" @?// 0A-^^D"N(0/0)F" @?/B/ 0A-^^B"N(0/0)F"']], 0, ignore, ignore) AT_CLEANUP # FIXME: Does not work on OBS runners, perhaps because of Xvfb? -- cgit v1.2.3