go back to previous folder/parent with the right focus item

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Michael REMY
Senior Member
Senior Member
Posts: 202
Joined: 2010-12-12, 10:05 UTC
Location: Amiens

go back to previous folder/parent with the right focus item

Post by *Michael REMY »

hi,

i put a button with "cm_GotoPreviousDir" command.

when i use it, it runs but TC never put me on the previous item i was in.

by example, i am in a list of 2000 files with also some folder links (.ink).
i double clic on .ink item to go into my folder.
then i hit the button with command "cm_GotoPreviousDir",

and TC put me always in the top of the previous list and never on the .ink file i clicked.
si i have to scroll/search again my file to go on my work...

so it would be perfect if the cm_GotoPreviousDir or a new command will come out with remind of the previous focus item too !

have a good day.
Last edited by Michael REMY on 2015-05-06, 14:03 UTC, edited 1 time in total.
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

cm_GotoPreviousDir is just "go back", same as Alt+Cursor left. TC does not remember any positions in the history.
Author of Total Commander
https://www.ghisler.com
Michael REMY
Senior Member
Senior Member
Posts: 202
Joined: 2010-12-12, 10:05 UTC
Location: Amiens

Post by *Michael REMY »

ghisler(Author) wrote:cm_GotoPreviousDir is just "go back", same as Alt+Cursor left. TC does not remember any positions in the history.
as you may saw, i write it in the "TC suggestions", so i didn't mean it was a bug but only a suggestion.


also, when you delete a file, TC remember the position in history because it put the focus on the next file.

as i said, it is not a bug i declare, just a suggestion of new feature...
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
User avatar
SkipR
Junior Member
Junior Member
Posts: 69
Joined: 2008-03-27, 10:39 UTC
Location: W. Australia

Re: go bakc to previous folder/parent with the right focus i

Post by *SkipR »

Michael REMY wrote:hi,

..
by example, i am in a list of 2000 files with also some folder links (.ink).
i double click on .ink item to go into my folder.
then i hit the button with command "cm_GotoPreviousDir",

and TC put me always in the top of the previous list and never on the .ink file i clicked.
so i have to scroll/search again my file to go on my work...
I think it is a good idea. I don't think I know any file manager that does that. My workaround has always been if in left folder tab open LNK files or folders entry via CTL+[right arrow] so folder is opened into right folder tab and I maintain current position in left folder tab. Is that what most people do? I also start TC with initial left and right folder tabs locked so a new tab opens when I do that - just sayin'
Skip
Michael REMY
Senior Member
Senior Member
Posts: 202
Joined: 2010-12-12, 10:05 UTC
Location: Amiens

Post by *Michael REMY »

i don't mean to update the cm_GotoPreviousDir.

but a new cm_GotoPreviousDirItemFocus will be welcome.


or have a [..back focus..] in the upper list where there are already [..] (go to parent)

or having a option to open the .lnk file into a new tab or the other side

as i said, the position focus is knew in programming code (see the object property index or position in your language)
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
Michael REMY
Senior Member
Senior Member
Posts: 202
Joined: 2010-12-12, 10:05 UTC
Location: Amiens

Post by *Michael REMY »

and i just noticed that.


this feature is already taken in charge in the goback process from inside an archive content to back to the original archive file !when you go to root-parent [..] from the conten arhive, then TC will put you back on the right item focused (the file .RAR by example)!

so, let's do it for .lnk files too !
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
User avatar
SkipR
Junior Member
Junior Member
Posts: 69
Joined: 2008-03-27, 10:39 UTC
Location: W. Australia

Post by *SkipR »

ghisler(Author) wrote:cm_GotoPreviousDir is just "go back", same as Alt+Cursor left. TC does not remember any positions in the history.
Is there a possibility of adding indexing to the dir history to implement the feature in the future?
Skip
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

In running TC - yes - but stored to the ini it would break backwards compatibility. :(
Author of Total Commander
https://www.ghisler.com
User avatar
SkipR
Junior Member
Junior Member
Posts: 69
Joined: 2008-03-27, 10:39 UTC
Location: W. Australia

Post by *SkipR »

ghisler(Author) wrote:In running TC - yes - but stored to the ini it would break backwards compatibility. :(
I was thinking something like the following meaning if ":10" is present (=backward compatibility as is optional) then jump to the 10th file down the list as a "simple" way to do it - just sayin :wink:

Code: Select all

[RightHistory]
0=c:\Documents and Settings\userid\Desktop\:10
Skip
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

SkipR,
Item number is bad idea, files may be added or removed. It is much better to remember filenames.

BTW I tried to add a colon with filename after paths and it doesn't break anything except tab names for unlocked tabs (TC shows colons with filenames there) but I think it isn't a big problem, so it seems to be a nice way to store filenames: older TC versions will store paths w/o names and ignore colons with filenames (because this path part doesn't exist).

E.g.:

Code: Select all

[right]
path=D:\TOTALCMD\Ghisler\:tcthumbs.db
[lefttabs]
0_path=D:\TOTALCMD\Ghisler\:tcthumbs.db
User avatar
SkipR
Junior Member
Junior Member
Posts: 69
Joined: 2008-03-27, 10:39 UTC
Location: W. Australia

Post by *SkipR »

MVV wrote:SkipR,
Item number is bad idea, files may be added or removed. It is much better to remember filenames...
I was suggesting a simple solution. The complete solution would be to track file name, sort order and offset, so the offset is used in correct sort context when tracked file name does not exist. Something like:

Code: Select all

[RightHistory]
0=c:\Documents and Settings\userid\Desktop\:file.ext:s:n
Where "s" is code for sort order when that folder was last viewed. When file name is not found offset "n" with sort "s" would return you to the logical next in list. Consider when sort order is not "name" say it is "ext", lets for argument sake say you have a torrent collection of 100 folders with varying extensions and your jumping back and forth between parent and child folders. If the folder disappears (could happen on a shared network folder), I think the logical intent would be show me the next item at that position in the dir list sorted by extension, hence the use of an offset. Yes if files are added to folder AS WELL you will not be in correct location.

By the way if you did it that way, it would allow for the possibility of going "back" to folder AND restore sort order for that folder which would be logical now that you are restoring the last used state. I don't know if everyone would want this but there are many configuration options that change how TC operates providing many "non traditional" features. All I know is that this would make me more productive.

Another related idea would be to allow in the "Change Dir Menu" something like:

Code: Select all

cd c:\Documents and Settings\userid\Desktop\:file.ext:s
cd c:\Documents and Settings\userid\Desktop\::s
allowing you to change sort order and list position with an enhanced "CD" command

Ghisler did make me think about traditional compatibility in that it COULD be argued it makes it uniquely different to previous versions and all other orthogonal file managers. I don't think that this is so but just saying - do some view it this way?
MVV wrote:[right]
path=D:\TOTALCMD\Ghisler\:tcthumbs.db
[lefttabs]
0_path=D:\TOTALCMD\Ghisler\:tcthumbs.db
@MVV, that code is more for first view of tab when TC starts which was not suggested by original poster (Michael REMY). Personally neutral on that but keen on having it in the history.

Other issues to consider:
  • will it break FS plugins. I tried "\\\NT Events\System:something" that seemed to ignore for ntevents plugin. It would be useful in future updated FS plugins too.
  • does using a ":" cause issues (eg Wine +TC, FTP FS, or virtual FS that may use ":" in file name)
Skip
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I don't think TC should remember sort order. When you press Alt+Left, you don't expect TC to reorder files. Filename is enough to put focus, if file doesn't exist focus may be placed to nearest file.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I also don't think it should remember the sort order - this will be handled by view mode switching by directory. I think the best solution would be to remember the file under the dursor, plus the distance (in number of files) from the top of the control, e.g. the 3rd file visible in the list.
Author of Total Commander
https://www.ghisler.com
g200
Junior Member
Junior Member
Posts: 32
Joined: 2015-10-08, 15:18 UTC

Re: go back to previous folder/parent with the right focus item

Post by *g200 »

Hi guys,
I am not sure if that feature was added because the discussion was 5 years ago, but I found MS has it in the file explorer.
https://answers.microsoft.com/en-us/windows/forum/windows_10-files-winpc/go-back-in-history-of-file-explorer/0f6f80de-70d4-408f-aa8e-e5be058f85ea
Post Reply