Reaction to cm_RenameOnly wrong when one object selected

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

Moderators: Hacker, Stefan2, white, sheep

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

Reaction to cm_RenameOnly wrong when one object selected

Post by *Dalai » 2018-05-16, 21:21 UTC

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
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36418
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-05-17, 10:00 UTC

I will check it. According to my code, Shift+F6 invokes cm_renmov.
Author of Total Commander
http://www.ghisler.com

User avatar
petermad
Power Member
Power Member
Posts: 8023
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Post by *petermad » 2018-05-17, 14:11 UTC

Shift+F6 invokes cm_renmov
no - cm_renmov is invoked by F6
License #524
Danish Total Commander Translator
TC 9.21a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit and TC 2.91b6 on Android 6.0
Get Extended Total Commander Menus | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36418
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-05-23, 15:33 UTC

This should be fixed in Total Commander 9.20 beta 4, please check!
Author of Total Commander
http://www.ghisler.com

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

Post by *Dalai » 2018-05-23, 16:22 UTC

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
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

User avatar
petermad
Power Member
Power Member
Posts: 8023
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Post by *petermad » 2018-05-24, 01:41 UTC

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
Danish Total Commander Translator
TC 9.21a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit and TC 2.91b6 on Android 6.0
Get Extended Total Commander Menus | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36418
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-05-30, 17:03 UTC

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
http://www.ghisler.com

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

Post by *Dalai » 2018-05-30, 17:45 UTC

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

Regards
Dalai
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

User avatar
petermad
Power Member
Power Member
Posts: 8023
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Post by *petermad » 2018-05-30, 21:24 UTC

Confirmed fixed in TC 9.20b5 :-)
License #524
Danish Total Commander Translator
TC 9.21a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit and TC 2.91b6 on Android 6.0
Get Extended Total Commander Menus | PHSM-Calendar

Post Reply