[TC 9.51] SELECTFILES dosn't always work with %M
Posted: 2021-01-15, 13:36 UTC
SELECTFILES doesn't work with %M or "%M" if used in an em_command and there is spaces in the file name.
To reproduce:
1. Have the same directory opened in both panels.
2. Put this command in the usercmd.ini file:
3. Make this button:
4. Put the cursor on a file with NO spaces in the name and switch to the opposite panel.
5. Click the button - The file with the same name of the active file in the opposite panel is marked.
6. Put the cursor on a file WITH a space in the name and switch to the opposite panel.
7. Click the button - You get the message "No matches found!" - not expected
______________________
8. Now make this button:
9. Put the cursor on a file WITH a space in the name and switch to the opposite panel.
10. Click the button - Now the file with the same name of the active file in the opposite panel is marked - as expected
______________________
11. Now put this command in the usercmd.ini file:
12. Make this button:
13. Put the cursor on a file WITH a space in the name and switch to the opposite panel.
14. Click the button - Now the file with the same name of the active file in the opposite panel is marked - as expected
______________________
If I in em_goto_item_opositepanel1 change
to
to prompt the parameters - then the button from 3. does work also for files with space in the name - peculiar
______________________
If I in em_goto_item_opositepanel2 change
to
then then the button from 12. still work also for files with space in the name.
But if I change it to:
to prompt the parameters - then the button from 12. does NOT work for files with space in the name - but gives the message: "No matches found!" - not expected
To reproduce:
1. Have the same directory opened in both panels.
2. Put this command in the usercmd.ini file:
Code: Select all
[em_goto_item_opositepanel1]
cmd=SELECTFILES
param="%M"
Code: Select all
TOTALCMD#BAR#DATA
em_goto_item_opositepanel1
wcmicons.dll,19
Mark file with the name of the active file in the opposite panel - if it exists
-1
5. Click the button - The file with the same name of the active file in the opposite panel is marked.
6. Put the cursor on a file WITH a space in the name and switch to the opposite panel.
7. Click the button - You get the message "No matches found!" - not expected
______________________
8. Now make this button:
Code: Select all
TOTALCMD#BAR#DATA
SELECTFILES
"%M"
wcmicons.dll,19
Mark file with the name of the active file in the opposite panel - if it exists
-1
10. Click the button - Now the file with the same name of the active file in the opposite panel is marked - as expected
______________________
11. Now put this command in the usercmd.ini file:
Code: Select all
[em_goto_item_opositepanel2]
cmd=SELECTFILEST
param=%N
Code: Select all
TOTALCMD#BAR#DATA
em_goto_item_opositepanel2
wcmicons.dll,19
Mark file with the name of the active file in the opposite panel - if it exists
-1
14. Click the button - Now the file with the same name of the active file in the opposite panel is marked - as expected
______________________
If I in em_goto_item_opositepanel1 change
Code: Select all
param="%M"
Code: Select all
param="?%M"
______________________
If I in em_goto_item_opositepanel2 change
Code: Select all
param=%N
Code: Select all
param="%N"
But if I change it to:
Code: Select all
param=?"%N"