[TC 11.02] Lister: Find next in a file not ending with newline char

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[TC 11.02] Lister: Find next in a file not ending with newline char

Post by *white »

Create a file with the following contents.
Make sure that there is no newline at the end (so the file ends at the end of the line and not below it).

Code: Select all

This is a test. This is a test.
Now do this test:
  • Press Ctrl+F and search for: this
  • Press F3
  • Press F3 again
    An error is displayed: Not found: this
  • Press Ctrl+F and search for: test
  • Press F3
  • Press F3 again
    No error, the last word seems to be found again.
  • Press Ctrl+F and search for: test.
  • Press F3
  • Press F3 again
    An error is displayed: Not found: test.
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [TC 11.02] Lister: Find next in a file not ending with newline char

Post by *Dalai »

Confirmed. This seems to have started in 10.50. Versions 10.0 and older find "test" properly and display the "not found" message as expected. The bug was introduced between 10.0 and 10.50.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.02] Lister: Find next in a file not ending with newline char

Post by *ghisler(Author) »

It's caused by a function to prevent infinite loops at the end of some files. The infinite loop is stopped by re-selecting the last match. It happens when the file offset of the last match is an odd number. I will try to add some additional checks.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.02] Lister: Find next in a file not ending with newline char

Post by *white »

Dalai wrote: 2023-11-17, 11:19 UTC The bug was introduced between 10.0 and 10.50.
Confirmed. In Total Commander 10.50 beta 1 to be exact.

Perhaps due to this change:
02.09.21 Fixed: Lister: In rare cases, a text search may not end by itself, only when the user presses another key (32/64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.02] Lister: Find next in a file not ending with newline char

Post by *ghisler(Author) »

Yes, that's exactly the reason.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.02] Lister: Find next in a file not ending with newline char

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.03 RC1, please check it!
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.02] Lister: Find next in a file not ending with newline char

Post by *white »

HISTORY.TXT wrote: 17.11.23 Fixed: Lister, Find next: With some search texts, no "Not found" error was shown and the last result remained selected (32/64)
Tested OK using Tc 11.03rc1 32-bit and 64-bit.

Moderator message from: white » 2024-01-19, 13:28 UTC

Moved to Fixed bugs.
Post Reply