Reaction to cm_RenameOnly wrong when one object selected

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Reaction to cm_RenameOnly wrong when one object selected

Post by *Dalai »

Hi there,

triggered by the topic Rename function doesn't respect the selected file? I think there's another bug in TC.
  1. Create the following wincmd.ini

    Code: Select all

    [Shortcuts]
    F2=cm_RenameSingleFile
    [Configuration]
    FirstTime=0
    FirstTimeIconLib=0
    Start TC with this new wincmd.ini, like this:

    Code: Select all

    totalcmd.exe /i="D:\wincmd.ini"
    (or wherever you created the file).
  2. Mark exactly one file or directory (e.g. via Insert key)
  3. Move the text cursor away from the selected object
  4. Press F2, which will execute cm_RenameSingleFile (remapped by above wincmd.ini). TC in-place renames the object under the cursor. That's good, because it's expected that cm_RenameSingleFile always operates on the object under the cursor like its description suggests.
  5. Abort the rename operation and press Shift+F6. TC also starts the in-place rename on the file under the cursor. This is wrong. A selection is active and the user expects TC to operate on it when cm_RenameOnly is called (mapped to Shift+F6 by default)
  6. Marking/selecting more than one object shows the dialog to Rename/Move X files, which is also good and expected.
This bug is present in TC 8.52a all the way up to and including 9.20 beta3; I didn't test older versions though because I don't think they're relevant.

(Hope there's a good explanation should this behavior be intentional)

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will check it. According to my code, Shift+F6 invokes cm_renmov.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Shift+F6 invokes cm_renmov
no - cm_renmov is invoked by F6
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in Total Commander 9.20 beta 4, please check!
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

The problem is only partially fixed. The reaction to cm_RenameOnly command is correct now, but this doesn't apply to Shift+F6. Selecting a single file, moving the cursor away from that file and pressing Shift+F6 still activates in-place rename of the file under the cursor.

Remember that F5, F6, F8/Del and Shift+F5 all operate on the selection, not the file under the cursor, so Shift+F6 should do the same IMO. Also note that the command browser claims that cm_RenameOnly is mapped to Shift+F6 which is clearly not the case (you can try that if you remap F6 or any other key to cm_RenameOnly yourself).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I agree with Dalai - cm_RenameOnly by itself works as expected, but it does not do the same as Shift+F6 when one file is selected and the cursor is on another file
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in beta 5, please test it!

To clarify, Shift+F6 didn't use cm_RenameOnly, it uses cm_RenMov. The state of the shift key is checked inside that function.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

I can confirm the fix in beta5 for TC 32 bit (didn't test TC x64).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Confirmed fixed in TC 9.20b5 :-)
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply