The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *AntonyD »

TC x32 and/or x64?
both work fine.
See the tooltip in the example.
I've took a look into that and should confirm author's note about the necessity of the last -1.
Without it - after pasting the code into the V.bar of Total - this button does not work as suggested.
It could only open (in supplied corresponding editor) the existing picked file and that's all.
I could fix this button only by opening the editor for this button and pressing OK in it.
So please - in ALL you codes - when you show some buttons: provide FULL code, even with -1 at the end.
#146217 personal license
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *Fla$her »

AntonyD wrote: 2024-08-21, 11:16 UTC So please - in ALL you codes - when you show some buttons: provide FULL code, even with -1 at the end.
I will do this only for internal commands, because in other cases the error was not detected.

GIF screencast added to the first post. There I also corrected the button code.
Overquoting is evil! 👎
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *AntonyD »

It is very difficult to say what is the matter with me/my conditions - but after watching the video
and a complete repetition of all your conditions (disk, folder names, file names, brief view of panels)
I was able to reproduce this error now)))
#146217 personal license
sa16
Senior Member
Senior Member
Posts: 344
Joined: 2021-09-10, 07:15 UTC

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *sa16 »

2Fla$her
There I also corrected the button code.
You could simply transfer any option to the line "Command:"
cm_Edit /G
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *Fla$her »

AntonyD wrote: 2024-08-21, 12:36 UTC I was able to reproduce this error now)))
Good. 👍🏼 There are already three of us.

2sa16
OK. I will take this into account in the future.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50817
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *ghisler(Author) »

I was finally able to reproduce the error! It happens only when "%1" wasn't specified when defining the editor. So as a temporary fix, change the editor from something like
notepad.exe
to
notepad.exe "%1"
to correctly focus the created file.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *Fla$her »

2ghisler(Author)
Command prompt:

Code: Select all

>assoc .txt
.txt=txtfile
>ftype txtfile
txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1

>assoc .jpg
.jpg=IrfanView.jpg
>ftype IrfanView.jpg
IrfanView.jpg="C:\Program Files\IrfanView\i_view32.exe" "%1"
The behavior is not different for both txt and jpg. The cursor remains in place for both commands with spaces.
If there are no spaces, then there is no problem for extensions that are not in HKCR (see txt2 in GIF).
Overquoting is evil! 👎
sa16
Senior Member
Senior Member
Posts: 344
Joined: 2021-09-10, 07:15 UTC

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *sa16 »

2Fla$her
It is suggested to try:

Code: Select all

[Configuration]
Editor=notepad.exe "%1"
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *Fla$her »

Why try it if I gave an example with jpg?
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50817
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *ghisler(Author) »

2Fla$her
Sorry, now I'm really confused - what does this have to do with file associations now? This report was about cm_Edit with parameters and cm_EditNewFile 1...
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 344
Joined: 2021-09-10, 07:15 UTC

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *sa16 »

2Fla$her
I was talking about editing wincmd.ini...
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *Fla$her »

ghisler(Author) wrote: 2024-08-22, 19:24 UTC Sorry, now I'm really confused - what does this have to do with file associations now?
You wrote about the editor, but you didn't write anything about TC settings.
In the test conditions that I gave in the GIF, I don't have such settings at all. That is, the bug must be reproduced with a clean config.
Overquoting is evil! 👎
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *AntonyD »

That is, the bug must be reproduced with a clean config.
That's right, and under these starting conditions, the Total settings for the text editor simply indicate the cmd "notepad.exe"
So, if you go into these settings and just add

Code: Select all

 "%1"
at the end, then this bug is already under the same "clean" conditions "out-of-the-box fresh installation" is no longer reproduced.
#146217 personal license
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *Fla$her »

AntonyD wrote: 2024-08-23, 08:04 UTC under these starting conditions, the Total settings for the text editor simply indicate the cmd "notepad.exe"
So, if you go into these settings and just add

Code: Select all

 "%1"
How is it possible to add "%1" to settings that don't exist? There is no Editor key. >>>
ghisler(Author) wrote: 2024-08-22, 09:53 UTC It happens only when "%1" wasn't specified when defining the editor.
Overquoting is evil! 👎
User avatar
AntonyD
Power Member
Power Member
Posts: 1660
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: The cursor doesn't move to a new file if there is a space in the path: cm_Edit + /CGL0T="%P" /N="FN"

Post by *AntonyD »

https://i.ibb.co/w7kRJb8/2024-08-23-134805.png
This element of the TC settings is responsible for defining the editor.
And of course, it has nothing to do with any buttons/keys.
But there was no talk of any key in principle as I read this all in a whole.
#146217 personal license
Post Reply