[10.52] TC does not sort by name in search result panel

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
beb
Senior Member
Senior Member
Posts: 432
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

[10.52] TC does not sort by name in search result panel

Post by *beb »

TC 10.52 64 bit @ Win10 64bit

1. search [Alt F7] for something (for "wget" in the instance)
2. opt for the "Feed to listbox" option upon the search gets over
3. try to sort by name
- Sort method: Natural sorting: alphabetical and numbers
- View mode: Custom: Name Ext Size Date [https://i.imgur.com/vTjSQoZ.png]

The sorting results are being rendered in unpredictable/random way [https://i.imgur.com/qnbXGbS.png]

As you can see,
- in the left panel [common view] the sorting behaves as it has to [files are sorted by the prescribed order].
- in the right panel [search results] the sorting is a mess.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
petermad
Power Member
Power Member
Posts: 14791
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [10.52] TC does not sort by name in search result panel

Post by *petermad »

2beb

Maybe it is related to this: viewtopic.php?t=77912

What happens if you reverse the sorting and then reverse it back - is it still randomly sorted?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
beb
Senior Member
Senior Member
Posts: 432
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: [10.52] TC does not sort by name in search result panel

Post by *beb »

petermad wrote: 2022-11-05, 22:42 UTC What happens if you reverse the sorting and then reverse it back - is it still randomly sorted?
Yes. The sorting [by name] is random all the way, either initially or upon reversing back and forth.
The same is with sorting by extension.
Only sorting by size and date works as intended.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
beb
Senior Member
Senior Member
Posts: 432
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: [10.52] TC does not sort by name in search result panel

Post by *beb »

By the way, I have had an idea and just checked to see if it would get confirmed.
The answer is simple and here it is:
Within the "Search result" panel (upon the "Feed to listbox" command) Total Commander is actually sorting files by the full names, not just by names (as expected).
That's it.

Edit:

Explanation:
1. Taking my current custom columns set [Name][Ext][=tc.size.bkMG2][=tc.writedate.D-M-Y h:m]
2. Adding [=tc.name][=tc.path][=tc.fullname] to it
3. Trying sorting and see what happens:
  • Sorting by [=tc.fullname] and by [=tc.path] works as intended
  • Sorting by [Name] gives the same result as by [=tc.fullname] and/or by [=tc.path]
    that is not meant to be; that's why the [Name] sorting looks random (unless you can see the path parts and understand what's going on)
  • Sorting by [=tc.name] works as intended and gives the proper result
    (as it is expected to be rendered with sorting by [Name] but the latter does fail)
NB Along with that, [=tc.fullname] that itself meant to output the file name including its full path is actually rendering only a "file name" part without a "full path."
Thus, I may assume that within the "Search results" panel:
- [Name] field behaves like [=tc.fullname] instead of to be and to act as [=tc.name]
- In its turn [=tc.fullname] is visually dropping off the [=tc.path] part hence gaining its look alike [=tc.name] (only comes along with .extension), but still acts as though it's a complete [=tc.fullname] and just cannot perform the function of [=tc.name] in the [Name] field*

Edit 2:
* [=tc.fullname] behaves like that not only within the "Search result" panel but in the common panels too.
Dalai wrote: 2015-05-15, 14:14 UTC tc.fullname means the file name including its full path, i.e. the file's absolute path. tc.name is the file name only, i.e. without path.
Regards
Dalai
So the above definition is no more a thing so far.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [10.52] TC does not sort by name in search result panel

Post by *ghisler(Author) »

Within the "Search result" panel (upon the "Feed to listbox" command) Total Commander is actually sorting files by the full names, not just by names (as expected).
Yes, that's correct.
Author of Total Commander
https://www.ghisler.com
Post Reply