Deleting the first folder from the second column moves the cursor to the beginning

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *ghisler(Author) »

Exactly, the confirmation dialog is different when deleting directly versus deleting to recycle bin.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *Fla$her »

It also concerns the move (F6), after which I noticed a problem.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *ghisler(Author) »

It also concerns the move (F6), after which I noticed a problem.
I cannot reproduce that. Tried moving files, empty folders and between directories on the same drive and between different drives.
Please describe when it happens with F6. It probably needs special conditions as when deleting.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *Fla$her »

2ghisler(Author)
Yes, it's a little different here. Add a file to the second column whose name is longer than the folder names from it. The folder being moved may not be empty.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *ghisler(Author) »

Sorry, no problems with that either, the cursor just goes to the next folder.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *Fla$her »

The presence of the file was not important. Just make the second column the first in the displayed list if there is a scrollbar. GIF
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *ghisler(Author) »

That doesn't seem to happen here. What am I missing?
Video recorded with Windows Snipping Tool
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *Fla$her »

AlwaysCopyInBackground=1
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *ghisler(Author) »

The cursor position isn't updated when moving in the background, because the user could go to a different source directory during the operation, or just move the cursor himself. TC just refreshes the list when done and the source is still the same, so when the file/directory under the cursor is gone, the cursor will move to the top.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *Fla$her »

It's not clear from your explanation why moving the cursor to the top doesn't occur in the absence of a scrollbar or other cursor positions. :?:

And in any case, I'm sure this can be fixed by taking into account the speed of the operation or by comparing the paths and the next name in the list by item number.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *ghisler(Author) »

It's not clear from your explanation why moving the cursor to the top doesn't occur in the absence of a scrollbar or other cursor positions. :?:
When a regular directory refresh occurs, TC saves the following data of the previous displayed file list:
1. File name of top position
2. File name of caret position
3. Location of the caret relative to the top position

After refreshing, TC looks for the file name of the top position and tries to restore it. Then it tries to find the file name of the caret position and put the caret back on that file. If the file is gone, it places the caret at the relative position it was before. For example, it was 1 line below the top, it will be put again one line below the top.

Now when the scrollbar is scrolled to the left, the top position is "..". When you delete the first entry of the second column, TC will put the cursor again there.

But when the scrollbar is scrolled 1 column or more to the right, the top position is the file at the top. But when you delete that, the name stored in steo 1 is gone, so the top position cannot be set. Therefore also the position relative to the top is lost.

In principle, it would be possible to look for the first file after the missing one which is available both in the old and new directory list. But this could be quite time consuming...
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *Fla$her »

2ghisler(Author)
Partly understandable. But why can't you pre-move the cursor to the next file, i.e. before the background movement?

I checked the background movement in Double and Free Commander. There is no such problem, the cursor (even inactive if another panel is activated) moves to the next file.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *ghisler(Author) »

But why can't you pre-move the cursor to the next file, i.e. before the background movement?
I'm doing exactly that when moving in the foreground. However, when in the background transfer manager, I can't interfere with what the user is doing in the foreground.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *Fla$her »

ghisler(Author) wrote: 2023-11-30, 09:05 UTCHowever, when in the background transfer manager, I can't interfere with what the user is doing in the foreground.
But I specified the key value as 1, not 2 for the AlwaysCopyInBackground key. What does the background transfer manager have to do with it?
Moreover, I wrote "pre-move" instead of "move", i.e. before the dialog appears.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting the first folder from the second column moves the cursor to the beginning

Post by *ghisler(Author) »

As soon as you click on "Background" in the progress dialog, TC stops updating the cursor position. I could change that to check whether the user changed directory or moved the cursor himself, but this may be difficult when someone starts multiple background operations.
Author of Total Commander
https://www.ghisler.com
Post Reply