File list not updating properly when using multiple internal commands involving tabs quickly.

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
vort3
Junior Member
Junior Member
Posts: 20
Joined: 2020-04-11, 10:30 UTC
Location: Kazakhstan

File list not updating properly when using multiple internal commands involving tabs quickly.

Post by *vort3 »

Here is my custom command:

Code: Select all

[em_OpenDirInNewTabOtherAndSwitch]
button=wcmicons.dll
cmd=cm_OpenDirInNewTabOther, cm_FocusTrg, cm_SwitchToNextTab, CM_WAIT 200, cm_FocusTrg
It tries to open directory under cursor in other panel in a new tab, switch to it (so it's in the foreground of the target panel) and then switch to original panel. Notice the CM_WAIT 200: it artificially slows down the execution of my command by adding delay after switching to new tab. Without the delay, my command fails. With CM_WAIT 200 it mostly works, but sometimes still fails. Using CM_WAIT 500 will always work but it slows down my speed too much.

UPD: With TabSwitchMode=1 this bug doesn't happen even without added delay, it only occurs when panels update after Tab release (TabSwitchMode=1).

Steps to reproduce:
[*] Add em_OpenDirInNewTabOtherAndSwitch (code above) to your usercmd.ini
[*] Open C:\ in your left panel and D:\ in right panel.
[*] Put your cursor in left panel to any folder, like Users folder.
[*] Execute em_OpenDirInNewTabOtherAndSwitch with a hotkey or button, or in any other way.

Expected behaviour:
[*] Left panel remains active with your cursor still on Users folder, but on the right panel there's a new foreground tab with C:\Users folder opened.

Actual result:
[*] Left panel remains active with your cursor still on Users folder, on the right panel there's a new foreground tab named Users, but file list and current path are not updated to reflect the new tab (still showing D:\ as was initially).
[*] In fact, even if you Reread the source, file list will still show D:\ and tab name will change back (I was expecting that after rereading the source file list and current path will update to C:\Users, because it's in the tab name).

If you can't reproduce it by following steps above, try to remove CM_WAIT 200 from the em_OpenDirInNewTabOtherAndSwitch command or change the delay to slammer value.

Using TC 9.51 (64 bit) on Windows 10 x64 LTSC (1809).
Last edited by vort3 on 2020-04-12, 20:03 UTC, edited 1 time in total.

English is not my native language.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: File list not updating properly when using multiple internal commands involving tabs quickly.

Post by *petermad »

I cannot reproduce this, even when omitting the cm_Wait command. I have testet it under Windows 7 and Windows 10 1909, and my Windows 10 computer is really slow, but still I cannot reproduce it.

But you don't need to do it this way - just enable "Configuration" -> "Options..." -> "Folder Tabs" -> "Ctrl+Up opens new tab in foreground".
This setting works for Ctrl+Shift+Up (= cm_OpenDirInNewTabOther) as well.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
vort3
Junior Member
Junior Member
Posts: 20
Joined: 2020-04-11, 10:30 UTC
Location: Kazakhstan

Re: File list not updating properly when using multiple internal commands involving tabs quickly.

Post by *vort3 »

petermad wrote: 2020-04-12, 15:30 UTC But you don't need to do it this way - just enable "Configuration" -> "Options..." -> "Folder Tabs" -> "Ctrl+Up opens new tab in foreground".
This setting works for Ctrl+Shift+Up (= cm_OpenDirInNewTabOther) as well.
The problem with this is that I want Ctrl+Up to open tabs in background (in current panel), but on the second panel I want them to be in foreground.

I can probably just change this setting and then rebind Ctrl+Up as I need, will try this now.

Also, can you please tell me if you have TabSwitchMode=1? I think it's 0 by default (and I quite like that), but maybe TabSwitchMode=1 would solve the problem for me, I'll try that now.

UPD: With TabSwitchMode=1 this bug doesn't happen, it only occurs when panels update after Tab release.

English is not my native language.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: File list not updating properly when using multiple internal commands involving tabs quickly.

Post by *petermad »

Here it works equally good with have TabSwitchMode=0 and TabSwitchMode=1 (I use TabSwitchMode=0 as standard).

Maybe it is another setting - how does it work for you with a clean ini file (i.e. TabSwitchMode=0 and DirTabOptions=824 (Ctrl+Up disabled))?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
vort3
Junior Member
Junior Member
Posts: 20
Joined: 2020-04-11, 10:30 UTC
Location: Kazakhstan

Re: File list not updating properly when using multiple internal commands involving tabs quickly.

Post by *vort3 »

I tried to set DirTabOptions=824 and everything worked. I'm not sure what exactly is causing the bug, though. Do you have any idea?

I have DirTabOptions=2043, can you try this?

English is not my native language.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: File list not updating properly when using multiple internal commands involving tabs quickly.

Post by *petermad »

With DirTabOptions=2043 the tab is opened in the background using your em_OpenDirInNewTabOtherAndSwitch command, wich is to be expected, since the "Ctrl+Up opens new tab in foreground" option is enabled with DirTabOptions=2043. The content of the opened tab is correct.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
vort3
Junior Member
Junior Member
Posts: 20
Joined: 2020-04-11, 10:30 UTC
Location: Kazakhstan

Re: File list not updating properly when using multiple internal commands involving tabs quickly.

Post by *vort3 »

Oops, my fault, I forgot that I already changed my settings (Ctrl+Up opens new tab in foreground, and now I use custom command to open dirs in new background folder instead).
Did you try it with "Ctrl+Up" opens new tab in foreground disabled, but everything else as if 2043? (1979)

English is not my native language.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: File list not updating properly when using multiple internal commands involving tabs quickly.

Post by *petermad »

Did you try it with "Ctrl+Up" opens new tab in foreground disabled, but everything else as if 2043? (1979)
Yes - that too - no problems.

You have to test with a clean ini file except for DirTabOptions=1979 - maybe there is a completely other setting giving you your problems
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
vort3
Junior Member
Junior Member
Posts: 20
Joined: 2020-04-11, 10:30 UTC
Location: Kazakhstan

Re: File list not updating properly when using multiple internal commands involving tabs quickly.

Post by *vort3 »

Maybe it has to do with hardware, and my laptop is just too slow to do commands as fast.

English is not my native language.
Post Reply