Text search in FindFiles, Lister+uLister via F3

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Text search in FindFiles, Lister+uLister via F3

Post by *DrShark »

I'm not sure whether it's a Total Commander or uLister/other plugins bug, and even whether it happes only to me.

So, in Search results from Find Files, if Lister doesn't use plugins, it's posible in file opened in it to go directly to a text from "Find text:" field of Find Files tool (press F3 or Alt+Shift+F3 to open the file in Lister, then F3 again to go to the text string).

If plugin uLister installed and configured to show some text files, it will not work: after pressing F3, uLister opens a file, and pressing F3 again leads to error:

Code: Select all

---------------------------
Not found:
---------------------------
text
---------------------------
ОК   
---------------------------
Just checked it on *.ini files.

Alternative search method by pressing Ctrl+F and Enter still works in plugin.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

It's definitely a bug in uLister, because ListSearchText() is properly called, with the search string being transfered correctly.

I just checked it in the source.
It's probably a missing initialization procedure for the OiT search, due to "lcs_findfirst" not being recognized.


BTW, is the original author still active?
There are a few other things I'd like to fix and improve.
Last edited by milo1012 on 2015-12-16, 18:02 UTC, edited 2 times in total.
TC plugins: PCREsearch and RegXtract
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think you should try to write here:
http://www.ghisler.ch/board/viewtopic.php?t=28413
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

milo1012 wrote:It's definitely a bug in uLister
MVV wrote:I think you should try to write here:
http://www.ghisler.ch/board/viewtopic.php?t=28413
I guess it will be better if moderators will merge topics and delete MVV's and this posts.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

Well, I just checked the Lister plugin guide, which states:

Code: Select all

lcs_findfirst    Search from the beginning of the first displayed line (not set: find next)
So it's not clear if TC is supposed to omit lcs_findfirst if you use F3 on a newly loaded Lister window after using the "Find text" feature,
or if it's uLister's fault, as it's no able to initialize the search when that flag is missing.
TC plugins: PCREsearch and RegXtract
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

lcs_findfirst is used to reset a search to the beginning of the display area. If it isn't set, the plugin should resume the search from the last result (or the beginning if there isn't any).
Author of Total Commander
https://www.ghisler.com
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

ghisler(Author) wrote:lIf it isn't set, the plugin should resume the search from the last result (or the beginning if there isn't any).
So uLister isn't supposed to omit results in that case.

In any case, it seems a bit "ambiguous" to me. Authors may assume that they can rely on the flag to initialize their search.
Maybe that part in the wlx guide should be clarified for the next update.


Since it's intended behavior from TC's side, this thread can be moved.
TC plugins: PCREsearch and RegXtract
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

TC 9 still shows "Not found:" error, which is a sign that it's a plugin problem. But before the topic will be moved to "Behaviour will not be changed" forum, I have a question. The question: can TC detect that plugin doesn't correcly use the API? And even if not, could it help if TC had an option to show Ctrl+F dialog instead of immediate search (which fails in plugin) on F3 keypress? This will allow to use keypress on Enter after F3 to find the word without having to close that "not found" error.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, TC can just see what the function returns.
Author of Total Commander
https://www.ghisler.com
Post Reply