Lister: "autoupdate" after search
Moderators: Hacker, petermad, Stefan2, white
Lister: "autoupdate" after search
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).
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).
I cannot confirm this from the described - need more details.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.
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.
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.
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.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
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.petermad wrote:That is not what I experience here. Here is what I experience:
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.
Which is also NOT GOOD (TM).In stead of telling me that the string couldn't be found, Lister keeps searching endlessly (the hourglass is on).
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.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.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com