[TC 11.57rc6c, 64-bit only] MRT: selection in filename mask not replaced when using plugin button
Moderators: Hacker, petermad, Stefan2, white
[TC 11.57rc6c, 64-bit only] MRT: selection in filename mask not replaced when using plugin button
Bug introduced in TC 11.03rc6 64-bit. 32-bit TC doesn't have this issue.
* Open 64-bit TC
* Select a file
* Press Ctrl+M to open MRT (test in filename mask is selected)
* Press Alt+i to activate plugin button
* Press Enter
Plugin placeholder is added to the text.
Expected: Filename mask is replaced with plugin placeholder.
* Open 64-bit TC
* Select a file
* Press Ctrl+M to open MRT (test in filename mask is selected)
* Press Alt+i to activate plugin button
* Press Enter
Plugin placeholder is added to the text.
Expected: Filename mask is replaced with plugin placeholder.
Re: [TC 11.57rc6c, 64-bit only] MRT: selection in filename mask not replaced when using plugin button
I prefer the current method. So that nothing is overwritten. You can select the part you want to overwrite beforehand. The current behavior is very sensible and desirable.
Re: [TC 11.57rc6c, 64-bit only] MRT: selection in filename mask not replaced when using plugin button
No, you can't. That's what the bug report is about.
- ghisler(Author)
- Site Admin

- Posts: 52790
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [TC 11.57rc6c, 64-bit only] MRT: selection in filename mask not replaced when using plugin button
I can't find anything in the history, but looking at the code it looks like a deliberate change. I will therefore not change this behaviour at this time, sorry.
Edit: The reason seems to be this change:
Edit: The reason seems to be this change:
The fix involved setting the focus back on the name edit box, which would mess with the selection.12.02.24 Fixed: Clicking on a groupbox (or button which cannot be focused) would put the focus on it although it was set to "no tabstop", which can cause dialog elements to disappear after Alt+Tab (64)
Moderator message from: ghisler(Author) » 2026-05-06, 13:10 UTC
Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [TC 11.57rc6c, 64-bit only] MRT: selection in filename mask not replaced when using plugin button
It is likely caused by the fix, but that doesn't mean it isn't a bug.ghisler(Author) wrote: 2026-05-06, 13:10 UTC Edit: The reason seems to be this change:The fix involved setting the focus back on the name edit box, which would mess with the selection.12.02.24 Fixed: Clicking on a groupbox (or button which cannot be focused) would put the focus on it although it was set to "no tabstop", which can cause dialog elements to disappear after Alt+Tab (64)
* Use "This is a test" in the filename mask field and select the word "test"
When using 64-bit TC, the Plugin button doesn't replace the text, but the [N#-#] Range button does. What makes this Range button different from the Plugin button?
(When using 32-bit TC, any button replaces the word "test".)
And what also changed in 64-bit TC in TC 11.03rc6 is the behavior of all the buttons for the extension. Since that version, when you click these buttons, they all cause the entire text to be replaced, regardless of any selection or cursor position. This is not the case when using the keyboard to activate the buttons.
(The behavior in 32-bit TC did not change.)
Re: [TC 11.57rc6c, 64-bit only] MRT: selection in filename mask not replaced when using plugin button
Tested using TC 11.57rc6d 64-bit.
When inserting a placeholder, all buttons work consistently now.
When choosing Cancel using the buttons [N#-#] Range, [=? ]Plugin and [E#-#] Range, there is a small inconsistency.
As you explained per email, the mask field loses focus in 64-bit TC when the user clicks these buttons. When you restore focus and restore the selection, this puts the cursor always at the end of the selection.
The small inconsistency is when using the keyboard instead of the mouse. When using Alt+A for the [E#-#] Range button and choosing Cancel, the selection and cursor position in the Extension field remain the same. This is not the case for the filename mask field when pressing Alt+R or Alt+i (the cursor position changes).
There is also an inconsistency in 32-bit TC when choosing Cancel after using these buttons.
In 32-bit TC, the [E#-#] Range button doesn't change the selection in the Extension field when choosing Cancel.
But when choosing Cancel after using the [N#-#] Range or [=? ]Plugin button, the entire filename mask field is selected.
When inserting a placeholder, all buttons work consistently now.
When choosing Cancel using the buttons [N#-#] Range, [=? ]Plugin and [E#-#] Range, there is a small inconsistency.
As you explained per email, the mask field loses focus in 64-bit TC when the user clicks these buttons. When you restore focus and restore the selection, this puts the cursor always at the end of the selection.
The small inconsistency is when using the keyboard instead of the mouse. When using Alt+A for the [E#-#] Range button and choosing Cancel, the selection and cursor position in the Extension field remain the same. This is not the case for the filename mask field when pressing Alt+R or Alt+i (the cursor position changes).
There is also an inconsistency in 32-bit TC when choosing Cancel after using these buttons.
In 32-bit TC, the [E#-#] Range button doesn't change the selection in the Extension field when choosing Cancel.
But when choosing Cancel after using the [N#-#] Range or [=? ]Plugin button, the entire filename mask field is selected.
Moderator message from: white » 2026-05-06, 19:32 UTC
Since the issue reported in first post has been fixed, I moved this topic for now
» from TC Behaviour which will not be changed to TC11.x bug reports (English)
» from TC Behaviour which will not be changed to TC11.x bug reports (English)
- ghisler(Author)
- Site Admin

- Posts: 52790
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [TC 11.57rc6c, 64-bit only] MRT: selection in filename mask not replaced when using plugin button
Thanks, I think that we can live with these small inconsistencies for now.
See:
https://learn.microsoft.com/en-us/windows/win32/controls/em-setsel
This cannot be fixed: Clicking on the button moves the focus away from the edit box, and putting it back makes windows select the entire box. Therefore I have to restore the selection, which always places the cursor behind the selection.When choosing Cancel using the buttons [N#-#] Range, [=? ]Plugin and [E#-#] Range, there is a small inconsistency.
As you explained per email, the mask field loses focus in 64-bit TC when the user clicks these buttons. When you restore focus and restore the selection, this puts the cursor always at the end of the selection.
See:
https://learn.microsoft.com/en-us/windows/win32/controls/em-setsel
Edit controls: The control displays a flashing caret at the end position regardless of the relative values of start and end.
Moderator message from: ghisler(Author) » 2026-05-07, 06:54 UTC
Moved back to will not be changed
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
