Lister: "autoupdate" after search

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
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

Lister: "autoupdate" after search

Post by *JFierce7 »

Hi,

I don't know if it is intentional: If I use search or repeat search, the file is reread.
However, it is reread *after* the search has been carried out.
Scrollbars are not shown if the will become necessary (other than with F2).
User avatar
petermad
Power Member
Power Member
Posts: 14913
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I cannot confirm this from the described - need more details.
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, please give us more details!
Author of Total Commander
https://www.ghisler.com
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

Post by *JFierce7 »

Okay, here you are:
Open a file in lister - text mode, of course.
Change the file in the background with an editor. Of course it might be changed by another background process...
Press F7 and enter a search term or use F5 if you have searched for text earlier.

Lister will sometimes reread the file - it is not in all cases deterministic.
If a search has been carried out, and the text was found, Lister reloads the
file automatically.
If no search had been carried out (after start of Lister) or the text could not be found, the file is reloaded after a new search was executed - independently whether this new search found text or not.
In all these cases the Lister window is not correctly redrawn - chars that were hidden by other windows remain invisible if you change to Lister, scrollbars are not drawn at all.

I hope you can reproduce it now. Sorry for confusion.
User avatar
petermad
Power Member
Power Member
Posts: 14913
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

That is not what I experience here. Here is what I experience:

1. I first open a big txt file (37k) in my text editor.
2. I open the same file in Lister.
3. In Lister I search for some text that only exist in the last "page" of the file.
4. After that I go to the start of the file again (Ctrl+PgUp)
5. I find the same text in the text editor
6. I change the text, so that i won't match the search string in Lister anymore.
7. I save the file.
8. I go back to Lister and repeat the search.

In stead of telling me that the string couldn't be found, Lister keeps searching endlessly (the hourglass is on).

During this endless search I can still put Lister in both the foreground and in the background, and the window, including scrollbars are redrawn correctly all the time.

If I press Escape then the search is aborted. I can now press F2, then F3 and will immediately get the message that the string is not found.
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
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

Post by *JFierce7 »

petermad wrote:That is not what I experience here. Here is what I experience:
Hmm, I only tried with a rather small text file, cause that was were I encountered this oddity. Just about a couple of lines or a couple of lines more than one Lister page.

Normally I had not carried out your steps 3 and 4. Nevertheless, if I follow your steps carefully, the behaviour doesn't change - Lister says "Cannot find text" on step 8 and reloads the file after pressing OK.

The difference in behaviour might be related to the internal buffer size of Lister. In my case, the whole file could be kept in memory, while the larger file that you used is read in portions.
In stead of telling me that the string couldn't be found, Lister keeps searching endlessly (the hourglass is on).
Which is also NOT GOOD (TM).
During this endless search I can still put Lister in both the foreground and in the background, and the window, including scrollbars are redrawn correctly all the time.
Probably because the scrollbars existed in the first place. Try the test with a very small file and change it to a somewhat longer one.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, it happens because lister's internal text and binary viewers do NOT read the entire file into memory, this would take a long time with big files! Only a small buffer of 32k around the current position is used. When the border of the buffer is reached, Lister has to read from the file.
Author of Total Commander
https://www.ghisler.com
Post Reply