Page 1 of 1

Type Ahead Find is finding items out of order

Posted: 15 Aug 2013 17:44
by Mesh
I'm using v12.80, and I discovered that in some circumstances, Type Ahead Find puts the focus on matches out of order. By that, I mean that it may find 12 matches, but the focused item may be match 8, not match 1.

The focused item should always be the very first successful match in the list from your *original* focused file.


Edit:

Clarification: Using "Prefer matches at beginning".

The problem that's occurring here is that when you hit the first letter, XY changes the focus to the first item that starts with that letter. But then as you continue typing, XY is moving downwards from that *newly* focused file - not your original focused file.

Re: Type Ahead Find is finding items out of order

Posted: 15 Aug 2013 18:09
by TheQwerty
What are your settings for how type ahead find matches? (The drop-down under 'Enable type ahead find'.)

I also disagree with your opinion that it should always select the top-most match as that would mean it completely ignores the currently focused position.

Given a folder with:

Code: Select all

A-Dir\
B-Dir\
...
Z-Dir\
1-file.txt
2-file.txt
a-file.txt
If I have the focus on 'Z-Dir\' and press 'a' isn't it just as, if not more, likely that I wanted to jump to 'a-file.txt' rather than 'A-Dir\'?

Re: Type Ahead Find is finding items out of order

Posted: 15 Aug 2013 18:18
by Mesh
TheQwerty wrote:
What are your settings for how type ahead find matches? (The drop-down under 'Enable type ahead find'.)

I also disagree with your opinion that it should always select the top-most match as that would mean it completely ignores the currently focused position.

Good catch - I have it set to "Prefer matches at beginning". And that makes a big difference here.

And you're right about the focused position - but only insofar as the **initial** focused position.


The problem that's occurring here is that when you hit the first letter, XY changes the focus to the first item that starts with that letter. But then as you continue typing, XY is moving downwards from that *newly* focused file - not your original focused file.

Re: Type Ahead Find is finding items out of order

Posted: 15 Aug 2013 20:23
by Borut
Mesh wrote:The problem that's occurring here is that when you hit the first letter, XY changes the focus to the first item that starts with that letter. But then as you continue typing, XY is moving downwards from that *newly* focused file - not your original focused file.
Maybe this needs a bit of clarification. I assume that with "as you continue typing" you mean that you start typing a completely different (i.e. new) pattern. In that case, as far as I see, if you want to start again from the beginning of the list, hitting the ESC before starting typing the new pattern solves the problem.

If, however, with "as you continue typing" you mean that you are typing further characters of the same pattern, then perhaps you are typing too slowly for the default time constants (which, for a long time, was my problem and made me avoid the type ahead function in the first place). This could be cared for by a tweak. I think you could even enter it as a script command:

Code: Select all

::tweak("TAFTimeout", 1500);"
(meaning in this case: every character typed not later than 1.5 secs after the previous one, belongs to the same pattern).

Maybe something of these two could help in your case.

Re: Type Ahead Find is finding items out of order

Posted: 15 Aug 2013 23:01
by Mesh
No, this has nothing to do with typing too slowly, nor does it have anything to do with typing a seperate pattern. I'm talking about typing a single pattern.


Let's say you have the following list of files:

-----------------------
a - Test.txt
b - Profile.txt
c - Test.txt
Patty.txt
q - Test.txt
r - Profile.txt
s - Test.txt
-----------------------

Now, set Type Ahead Find to "Prefer match at beginning" and put the focus on the first file.

Now if you type "pro" to get a file with the word "profile" in it, what **should** happen is that the first file below the focused one that matches your pattern should be what the focus jumps to - which in this case is "b - Profile.txt", since there is no file that starts with "pro".

What actually happens is that as soon as you hit the first "p", the focus jumps to "Patty.txt". But as you continue typing (with no pause or slowdown), it will find the first match below this new focus point, which is "r - Profile.txt". It *should* reset the considered starting point to your original when you continued to type, but it doesn't - and as a result, it comes up with a file far below where you might have started off.

Re: Type Ahead Find is finding items out of order

Posted: 02 Sep 2013 12:31
by admin
TAF is working its way downwards. This is how it works. I think this is the expected behavior.

Re: Type Ahead Find is finding items out of order

Posted: 02 Sep 2013 17:33
by Mesh
admin wrote:TAF is working its way downwards. This is how it works. I think this is the expected behavior.
Not like this. The "prefer match at beginning" setting - if it fails to find a match at the beginning of any item, it should reset the search within any part of the name from the initially selected item. The post I made right before yours illustrates this.

If it doesn't behave that way, you can routinely end up with the first match being randomly in the middle (or at the end) of a set of valid matches, instead of at the first one. And matching the *first* viable file is the expected behavior.

There is no circumstance in any application where it is expected that the first match of a search is at a random member of the matching set. The expected behavior is always that the first match is the closest one in the direction of the search.

Re: Type Ahead Find is finding items out of order

Posted: 02 Sep 2013 18:16
by admin
Excuse my previous lame attempt to avoid the obvious, I already felt it coming that you had work for me to do. So, yes, I agree. Change comes with next version. :)

Re: Type Ahead Find is finding items out of order

Posted: 02 Sep 2013 19:33
by Mesh
<laughing>

Thanks, Don. Sorry for the additional work! :)

Re: Type Ahead Find is finding items out of order

Posted: 04 Sep 2013 17:58
by grindax
.