TSE: Issue: LFind: search option 'cgiv'

16 views
Skip to first unread message

knud van eeden

unread,
May 24, 2025, 3:22:12 PM5/24/25
to SemWare TSE Pro Text Editor
Hello,

1. Tested in TSE v4.50.5

2. One wants to search ONLY in the full 'current line' (=c), globally (=g), ignorecase (=i) and view (=v).

3. But if you run it, it searches in the WHOLE file and shows ALL lines containing the search string, 
instead of only the current line as wanted.

4. That is unexpected.

5. Expected was that it should only search in the current line globally and show only if the text is found the current line.

6. Run e.g. this TSE program to see that it shows all occurrences of 'test' thus that is unexpected, it should
at most show the current line at the cursor.

---

PROC Main()
 // test
 // test
 // test
 // test
 // test
 // test
 //
 LFind( "test", "cgiv" )
 //
END

---

with friendly greetings
Knud van Eeden




S.E. Mitchell

unread,
May 24, 2025, 3:49:47 PM5/24/25
to sem...@googlegroups.com
The code currently has:
if (fi.findopttab[view])
fi.findopttab[ocurrent_line] = fi.findopttab[back] = 0;
It turns those options off if view is selected. This is because I
could not figure out an easy way to implement view on the current
line.
Being my myopic, lazy self, I did not really see the use in it anyway.

Is something that is useful, 'v' with 'c' ?
If it is, I'll think about how to implement it.
--
Sammy Mitchell
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/semware/1788894547.1075002.1748114526260%40mail.yahoo.com.

knud van eeden

unread,
May 24, 2025, 5:10:20 PM5/24/25
to sem...@googlegroups.com
1. Ideally it should show a 'view' of that 1 line when found.

2. Thus a 'view' of 1 line instead of a view of N lines
(where N > 1)

3. But it is OK, then just FYI, as one can use the workaround

cgi

which works similarly.

4. So remembering not to use 'v' also with 'cgi'.

Thanks
with friendly greetings
Knud van Eeden



knud van eeden

unread,
May 27, 2025, 10:10:46 AM5/27/25
to sem...@googlegroups.com
> Is something that is useful, 'v' with 'c' ?
> If it is, I'll think about how to implement it.

On the other hand rethinking, I assume still it is a kind of a design bug.

Because including 'c' in the search options
should only show the current line, also in 'view'.

At this moment it shows thus *all* found lines in the *whole* file.

That should never be correct thus.

And a 'view' which includes search option 'c' should thus be a view with only 1 line.

I assume that in the source code of 'view' it could
maybe be restricted to show only 1 line, e.g. the current
line e.g. something like
the total amount of lines to show is then set to

minimum = 1
and
maximum = 1


Reply all
Reply to author
Forward
0 new messages