[Bug]Watchdirs=5 and cursor pos TC V 6.54 PB4

English support forum

Moderators: white, Hacker, petermad, Stefan2

bugmenot
Member
Member
Posts: 148
Joined: 2004-11-22, 11:59 UTC

Post by *bugmenot »

I can't confirm that. In both cases cursor is not restored, nothing is selected.

If I use following script, note 4th line, a.file is selected in both cases. Feature or bug who knows? I think it is a feture.

echo off
for /l %%a in (1,1,10000) do cd d:\
del a.file
for /l %%a in (1,1,1) do cd d:\
copy test.bat a.file
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

I must agree, it seems to be a question of timing. Here it works as I have described but when I tried to make a video it did not work anymore - when I stop the recorder I can reproduce it again.

Neverthless, you got the point with the altered batch. Explorer does not recognize the removal of the file if it is restored fast enough or maybe some in other cases.

So Explorer works inconsistent. In TC you can choose whether it shall watch the change of the directories or not. And exactly this is done by TC.

So it is a bug of Explorer IMHO.

In so far I consider it also as buggy how Windows handles the filedate:

I have deleted a file (and remembered its creation date). Then I saved a completely different file to the same place with the same name in between a few seconds. A look to the file properties shows to me the creation date of the former file.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Post by *Jungle »

2Mr. Ghisler
I don't know how cursor position is restored now, but i think that it could be done by saving current (under cursor) [full]name and its dir/file attribute when main window becomes inactive and then by finding corresponding item (if it still exists) when the one becomes active. As there can't be 2 or more identical files/dirs in the same dir so i think it would work in any case. Am i right or i don't understand something?
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Jungle wrote:2Mr. Ghisler
I don't know how cursor position is restored now, but i think that it could be done by saving current (under cursor) [full]name and its dir/file attribute when main window becomes inactive and then by finding corresponding item (if it still exists) when the one becomes active. As there can't be 2 or more identical files/dirs in the same dir so i think it would work in any case. Am i right or i don't understand something?
The main problem is: When the file disappears TC has to set the focus to another file. I don't think that TC should expect a deleted file to re-appear. If TC would do it could of course check when a new file appears in a Window if this is the one that has been deleted before. But that implies that TC should remember the last deleted files for at least two panels. And then will come probably the request to remember the deleted files for each Tab separately.

I think this is not necessary. If one don't like this behavior, then one may disable the watchdirs feature or set it- as Flint ahs already proposed - only if TC in forground (adding 8 to the current value).

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Post by *Jungle »

2Sheepdog
i don't see a problem. if a file that was under cursor disappears, cursor should be put to the first item. in all the other cases restoring should be done as i described. no need to remember deleted.
somehow position is remembered now for each tab so why it couldn't be adjusted this way?
in any case this was just my vision of situation, not a suggestion to implement.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Jungle wrote:in any case this was just my vision of situation, not a suggestion to implement.
Then I simply misunderstood you.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Post by *Jungle »

Sheepdog wrote:Then I simply misunderstood you.
some posts above mr. Ghisler said that he solved the problem. i just wonder:
1. how is cursor position saving/restoring performed now?
2. are there different restore schemes for each watchdir setting? if so - why?
3. how much easier/harder my variant is? what are the "pluses" and "minuses"?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48096
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Currently Total Commander updates the cursor position for each notification it receives. So if it receives first a delete and then a create, and the cursor was on the deleted file, then the cursor will move away from that file, and remain on the new. It seems that Explorer is moving the cursor only after it has aggregated a few updates, which is much more difficult. I will try to do this in TC 7.0 too.
Author of Total Commander
https://www.ghisler.com
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Post by *Jungle »

ghisler(Author) wrote:Currently Total Commander updates the cursor position for each notification it receives. So if it receives first a delete and then a create, and the cursor was on the deleted file, then the cursor will move away from that file, and remain on the new.
Why don't just move cursor to the first item if the item under cursor was deleted? I would consider such behaviour normal. Maybe Explorer doesn't do the same, but why it should be exactly as in Explorer?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48096
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Why don't just move cursor to the first item if the item under cursor was deleted?
Because it would be very user-unfriendly! I would hate such behaviour!
Author of Total Commander
https://www.ghisler.com
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Post by *Jungle »

ghisler(Author) wrote:Because it would be very user-unfriendly! I would hate such behaviour!
Ok.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Because it would be very user-unfriendly! I would hate such behaviour!
What about including a Karl Klammer like character? He is always friendly to all users :mrgreen:
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

[OT]
Hehe, yeah. And Karl could propose a set of very meaningful actions just like its role model in Offiz. This would allow you to do things you don't want to do very quickly:

A file with the cursor on it has changed. What do you like to do?
- move cursor to null device
- try to transfer cursor to Outlook
- read more about cursors online
- add a metallic look to the cursor
- insult cursor personally to enlighten your own miserable life
:wink:
[/OT]
User avatar
Hacker
Moderator
Moderator
Posts: 13071
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Jungle,
Why don't just move cursor to the first item if the item under cursor was deleted?
Because you would lose your relative position in the filelist.
Imagine looking for some JPG which you know is somewhere in the middle of the filelist, but you don't know it's name. In the background some other software is rotating JPEGs and your cursor is on one of them just as it is being deleted and recreated. So you cursor is placed on [..] and you can start browsing the filelist from the beginning again.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Hacker wrote: In the background some other software is rotating JPEGs and your cursor is on one of them just as it is being deleted and recreated. So you cursor is placed on [..] and you can start browsing the filelist from the beginning again.
Nice picture, maybe one does it with Irfanview in batchmode for 250 files. Nochance to ever find the file before this rotating was ended. ;) :lol:

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Post Reply