Directory history issue: new history doesn't erase the old

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

Moderators: sheep, Hacker, Stefan2, white

alphonse68
Junior Member
Junior Member
Posts: 73
Joined: 2011-09-26, 13:53 UTC

Directory history issue: new history doesn't erase the old

Post by *alphonse68 » 2019-10-20, 14:47 UTC

Hello all,

I have an issue with the dir history.
Supposing we have a dir tree like this:
C:\0\1\2\3\4

1. Start at C:\ with a clean dir history
2. Enter dir 0, then 1... all the way to 4
3. Use the "<-Back" button or Alt+LeftArrow to backtrack all the way to 0 (there should be no "back" history left)
4. Enter 0 again (or any other directory, for that matter)
5. Use the "<-Back" button or Alt+LeftArrow to backtrack more than once, and the history buffer kicks in again from "the top" (4)

It seems to me that once backtracked to any point, new history would erase the old from that point on.

Cheers

User avatar
Usher
Power Member
Power Member
Posts: 578
Joined: 2011-03-11, 10:11 UTC

Re: Directory history issue: new history doesn't erase the old

Post by *Usher » 2019-10-20, 17:52 UTC

If you use backspace in your browser, will it delete visited page address from the browser history? No. You can move back and forward. If you move back and then go other way, the browser will remove previous forward part only from the tab history, visited pages will be still present in the global browser history.

TC doesn't provide separate history list per tab (which behaviour you seem to expect), and full history should list all visited dirs (as in global browser history).
TC uses other approach: there are options to decide which dirs are removed by history thinning - they are described in HISTORY.TXT.
Regards from Poland
Andrzej P. Wozniak

alphonse68
Junior Member
Junior Member
Posts: 73
Joined: 2011-09-26, 13:53 UTC

Re: Directory history issue: new history doesn't erase the old

Post by *alphonse68 » 2019-10-21, 02:44 UTC

Thank you, Usher, but I was not referring to tabs nor did I mention them in my post and I don't think I even insinuated using them. You baffled me there.

Now, this was not the behavior prior to this version.
Normally, once I backtracked to any given point and change course from there, all the history that was backtracked would be erased and replaced by the new "course".

Even when using tabs, and I do know that the history is for the entire pane and not per tab (when I use them), backtracking would mean going through all the tabs I had changes to and the changes of directories in each tab. However, once the backtracking stopped and a forward move was made--in other words, entering another directory--the backtracked history would be cleared with the first forward directory change. I know because I normally clear the dir history buffer by pressing Alt+LeftArrow until it gets to the directory where TC opened on that particular session, tabs or no tabs.

Cheers

User avatar
petermad
Power Member
Power Member
Posts: 8818
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Directory history issue: new history doesn't erase the old

Post by *petermad » 2019-10-21, 12:29 UTC

2alphonse68
Now, this was not the behavior prior to this version.
Have you tried to disable the new setting: "Configuration" -> "Options..." -> "Operation" ->"Directory history thinning"?

Notice that if you have enabled "Directory history thinning" you can see the full history by pressing Shift+Alt+Down
License #524 (1994)
Danish Total Commander Translator
TC 9.5b3 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

umbra
Power Member
Power Member
Posts: 807
Joined: 2012-01-14, 20:41 UTC

Re: Directory history issue: new history doesn't erase the old

Post by *umbra » 2019-10-21, 13:10 UTC

I can confirm it. And while I prefer the new behavior, it is a change when compared to TC 9.22a.
And the "Directory history thinning" setting does not seem to have any effect on this.
Windows 7 Pro x64, Windows 10 Pro x64

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

Re: Directory history issue: new history doesn't erase the old

Post by *ghisler(Author) » 2019-10-21, 15:33 UTC

There is an option for that in wincmd.ini:
[Configuration]
HistoryAppend=0

It's 1 by default, so you don't lose any directories from the history when going back.
Author of Total Commander
http://www.ghisler.com

User avatar
petermad
Power Member
Power Member
Posts: 8818
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Directory history issue: new history doesn't erase the old

Post by *petermad » 2019-10-21, 15:40 UTC

2alphonse68
I can confirm the difference between v. 9.5b1 and 9.22a except for this:
4. Enter 0 again (or any other directory, for that matter)
I can only reproduce that the history buffer kicks in again from "the top" (4) if I enter another directory than 0, not if I enter 0. I can also only reproduce it when using Alt+Leftarrow not when using backspace.

So what I do is having dirs c:\0\1\2\3\4 and dir c:\a
Start with clean history in c:\
Go to c:\0 then c:\0\1 then to c:\0\1\2 then to c:\0\1\2\3 and finally to c:\0\1\2\3\4
Use Alt+leftarrow to go back to c:\ through c:\0\1\2\3, c:\0\1\2 and c:\0\1 and c:\0
Go into c:\a
Use Alt+leftarrow - and here comes the difference: In TC 9.22a that leads back to c:\ as expected, whereas in TC 9.5b1 it leads to c:\0\1\2\3\4
In TC 9.22a further press on Alt+leftarrow stays in c:\ while in TC 9.5b1 further press on Alt+leftarrow takes you back through through c:\0\1\2\3, c:\0\1\2, c:\0\1 and c:\0 and ends up in c:\ - but with the cursor on c:\a not on c:\0

As you I find the way of TC 9.22a more correct and intuitive.

If the Alt+leftarrow press while in c:\a would lead back to c:\ and a further press would lead to c:\0 og so forth it would be intuitive, and an improvemet to 8.22a, where futrher presses on Alt+leftarrow after goin back from c:\a to c:\ doesn't have any effect.
Last edited by petermad on 2019-10-22, 10:09 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b3 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

umbra
Power Member
Power Member
Posts: 807
Joined: 2012-01-14, 20:41 UTC

Re: Directory history issue: new history doesn't erase the old

Post by *umbra » 2019-10-21, 15:52 UTC

The change is maybe related to this:
history950.txt wrote: 14.07.19 Added: Directory history: When going to previous entry via Alt+Left arrow, and then manually changing to a different directory, append that directory to the END of the history (32/64)
AKA, it no longer rewrites the history, as it used to in the previous versions.

2ghisler
Could you please confirm whether it's an intentional change?
Windows 7 Pro x64, Windows 10 Pro x64

User avatar
petermad
Power Member
Power Member
Posts: 8818
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Directory history issue: new history doesn't erase the old

Post by *petermad » 2019-10-21, 17:11 UTC

2umbra
The change is maybe related to this:
I looks like that indeed.
Last edited by petermad on 2019-11-02, 17:51 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b3 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
petermad
Power Member
Power Member
Posts: 8818
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Directory history issue: new history doesn't erase the old

Post by *petermad » 2019-10-21, 20:27 UTC

ghisler(Author) wrote:
2019-10-21, 15:33 UTC
There is an option for that in wincmd.ini:
[Configuration]
HistoryAppend=0

It's 1 by default, so you don't lose any directories from the history when going back.
It doen't change anything whether I use HistoryAppend=1 or HistoryAppend=0 - there is still this change in functinonality between TC 922a and TC 9.5x as described before:
So what I do is having dirs c:\0\1\2\3\4 and dir c:\a
Start with clean history in c:\
Go to c:\0 then c:\0\1 then to c:\0\1\2 then to c:\0\1\2\3 and finally to c:\0\1\2\3\4
Use Alt+leftarrow to go back to c:\ through c:\0\1\2\3, c:\0\1\2 and c:\0\1 and c:\0
Go into c:\a
Use Alt+leftarrow - and here comes the difference: In TC 9.22a that leads back to c:\ as expected, whereas in TC 9.5b1 it leads to c:\0\1\2\3\4
In TC 9.22a further press on Alt+leftarrow stays in c:\ while in TC 9.5b1 further press on Alt+leftarrow takes you back through through c:\0\1\2\3, c:\0\1\2, c:\0\1 and c:\0 and ends up in c:\ - but with the cursor on c:\a not on c:\0
Last edited by petermad on 2019-10-22, 10:09 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b3 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

alphonse68
Junior Member
Junior Member
Posts: 73
Joined: 2011-09-26, 13:53 UTC

Re: Directory history issue: new history doesn't erase the old

Post by *alphonse68 » 2019-10-22, 03:31 UTC

It took me a while to gather the settings and options involved, and test with the possible combinations (plus I have one hell of a cold!), but I ended up with the same results that Petermad came up with: no change... and I did test both using the "<-Back" button and "Alt+LeftArrow"

I played using 1 and 0 in HistAppend and HistThin (four combinations), and restarting TC each time.
These are my final settings in [Configuration]
HistoryAppend=0 ; as recommended by Mr Ghisler, which makes perfect sense, but...
HistoryLen=10
HistoryThinning=1
HistoryThinningDelta=5000

Cheers

alphonse68
Junior Member
Junior Member
Posts: 73
Joined: 2011-09-26, 13:53 UTC

Re: Directory history issue: new history doesn't erase the old

Post by *alphonse68 » 2019-10-22, 19:15 UTC

Is there a way to clean the history buffer without exiting TC?
That would provide a temp solution, because I also noticed that it adds the directories into which I enter for a second or two, in spite of the setting DirThinning=1


Cheers

User avatar
Usher
Power Member
Power Member
Posts: 578
Joined: 2011-03-11, 10:11 UTC

Re: Directory history issue: new history doesn't erase the old

Post by *Usher » 2019-10-22, 22:07 UTC

2alphonse68
You can redirect sections [LeftHistory] and [RightHistory] from wincmd.ini to other file and just delete that file when needed.
Regards from Poland
Andrzej P. Wozniak

alphonse68
Junior Member
Junior Member
Posts: 73
Joined: 2011-09-26, 13:53 UTC

Re: Directory history issue: new history doesn't erase the old

Post by *alphonse68 » 2019-10-23, 17:59 UTC

Usher wrote:
2019-10-22, 22:07 UTC
You can redirect sections [LeftHistory] and [RightHistory] from wincmd.ini to other file and just delete that file when needed.
Thank you for the suggestion, but that cleans the history for when I close and reopen TC; it does not clean the buffer, as in the history that TC holds in memory during the current session, which is what I want to clear.

My issue is that I fail to see why, if I have perused a number of directories and I backtrack to the first one in my history buffer, then go into another dir, why should I have to go through the entire history just to go back one?

Cheers

User avatar
Usher
Power Member
Power Member
Posts: 578
Joined: 2011-03-11, 10:11 UTC

Re: Directory history issue: new history doesn't erase the old

Post by *Usher » 2019-10-23, 21:47 UTC

2alphonse68
HISTORY.TXT wrote: 08.07.19 Added: Directory history thinning: wincmd.ini [Configuration] HistoryThinningDelta=5000 defaults to 5 seconds the user must stay in a directory to keep it in the history (32/64)
What settings for history thinning do you use now? If you switch back and forward faster than in 5 s, the directory may not be counted as last visited and won't be moved to the end of the list, I think.
Regards from Poland
Andrzej P. Wozniak

Post Reply