-[8.50RC1]F5/F6, Ctrl+V: Line breaks and tabs still inserted
Moderators: Hacker, petermad, Stefan2, white
-[8.50RC1]F5/F6, Ctrl+V: Line breaks and tabs still inserted
According to changelog, new addition of 8.50RC1 is masking line breaks, tabs etc when text is inserted into edit fields on F5/F6/Shift+F6. However I can't make it working.
I copy two text lines to clipboard and then paste into edit field, only first line is inserted. Also when I paste text with tab character, it is also inserted...
TC 8.50RC1x32.
I copy two text lines to clipboard and then paste into edit field, only first line is inserted. Also when I paste text with tab character, it is also inserted...
TC 8.50RC1x32.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
No, it's coreect - they are only removed after you actually clicked OK. A windows linebreak (cr/lf) cannot be pasted this way, but half a break can, as described in the original bug report:
http://ghisler.ch/board/viewtopic.php?t=39179
http://ghisler.ch/board/viewtopic.php?t=39179
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Original report doesn't specify used line break style.
Anyway, I created text file with contents SAP CRYSTAL SERVER 2013\x0ACLIENT COMPONENTS and when I copy text from Lister and paste it into F7 dialog, I see entire line but I can't create directory, TC reports an error.
According to changelog,
ND,
It would be total mess if TC copied files with names different from displayed in copy dialog.
Anyway, I created text file with contents SAP CRYSTAL SERVER 2013\x0ACLIENT COMPONENTS and when I copy text from Lister and paste it into F7 dialog, I see entire line but I can't create directory, TC reports an error.
According to changelog,
So, TC should remove both #13 and #10 because they both are within #00-#31, but it doesn't. Also it should replace tabs with spaces but it doesn't. That's why I state it as a bug: documented behaviour is different.HISTORY.TXT wrote:12.01.14 Added: F5,F6,Shift+F6: Remove characters #00-#31 like line breaks (LF) in name and replace tabs by spaces when new name pasted from clipboard (32/64)
ND,
It would be total mess if TC copied files with names different from displayed in copy dialog.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
As the line from the history states, this was only added to F5, F6 and Shift+F6, not F7.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
The original bug report was about F7 (too), wasn't it?ghisler(Author) wrote:As the line from the history states, this was only added to F5, F6 and Shift+F6, not F7.
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Well, with all these limitations I can see that something has changed in compare to older versions. However history states that all characters #0-#31 are masked while #13 and #9 are not masked in F5 dialog, #13 is simply treated as end of line, #9 is pasted as is.ghisler(Author) wrote:As the line from the history states, this was only added to F5, F6 and Shift+F6, not F7.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
#13 cannot even be pasted, so TC cannot handle it. #9 is documented.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Maybe this is just a misunderstanding? The characters are replaced only when you click OK in the copy/move/rename dialog, not when you press Ctrl+V. Paste itself is handled by Windows, TC doesn't interfere.
Btw, you cannot create a file with a space character. Therefore if the file is created, Tab is replaced by space.
Btw, you cannot create a file with a space character. Therefore if the file is created, Tab is replaced by space.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hmm, how should I change it? I thought that it was quite clear...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I think you can add a few words more:
But I think you also can catch paste message after it has been processed by Windows dialog procedure (when it returns control from subclassed procedure to your one) and then scan line for bad characters in order to replace them with spaces so user would see final name before he clicks OK. In such case you won't need to process pasting manually.12.01.14 Added: F5,F6,Shift+F6: Remove characters #00-#31 like Unix line breaks (LF) in name and replace tabs by spaces when new name pasted from clipboard and user clicks OK (32/64)
I also think that this would be a good solution - the user would see the proper name immediately.MVV wrote:I think you also can catch paste message after it has been processed by Windows dialog procedure
And this method (with subclassing and handling WM_COPY message) could probably be used for all edit fields and comboboxes in TC - I don't see any reason for allowing pasting special characters.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, it could be done with subclassing, but I don't want to risk that now just before the release. I don't want to add new features either, so I will not change the F7 function now.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com