Sorry for asking that late: Actually first time I try to reproduce .. possibly I fail to understand what this bug is about.
Using thunar master I create folders A, B and C and open each of them as tab in order A,B,C. Closing and restarting thunar opens them in the same order than before.
Just took a try for your fix from !131 (b3010fd3) .. actually that reverses the order of the tabs for me, each time I open thunar :/ So to be checked why you face that bug.
Using thunar master I create folders A, B and C and open each of them as tab in order A,B,C. Closing and restarting thunar opens them in the same order than before.
Can you please try twice in succession? Since each time the tab order gets reversed, it alternates between the correct original order and reverse order in consecutive executions.
Here's the screencast:
I'm not sure if this matters but I have installed thunar from master (thunar 4.17.3git-b3739cb8 (Xfce 4.16)) at custom location and I also have distro provided thunar (thunar 1.8.14 (Xfce 4.14)) installed.
Indeed misc-switch-to-new-tab makes the difference.
I would suggest, in order to reduce confusion, best rename !131 (merged) to "After restoring tabs set focus on the last focused tab" and fix this bug in a separate MR.