TC adds unexpected line break in tooltip text [32/64]

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

TC adds unexpected line break in tooltip text [32/64]

Post by *MVV »

Tested with following tooltip:

Code: Select all

Real path: [=ntlinks.Real path]\nIndex: [=ntlinks.Object Index]\nCopies ([=ntlinks.Hardlinks] total):\n[=ntlinks.Hard Copies.0]\n[=ntlinks.Hard Copies.1]\n[=ntlinks.Hard Copies.2]\n[=ntlinks.Hard Copies.3]\n
Screenshot:
Image

I've tried to add a space just after :\n, it solves problem but adds an extra line break there (it is strange too).
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

Confirmed. Tested with

Code: Select all

[=tc.dosname] a\n[=tc.path]
Looks like it happens, when text in the second variable ([=tc.path]) is longer than text in the first variable ([=tc.dosname]).
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It seems that TC doen't treat \n character as a white-space character here because wrap doesn't happen if a space exists just before \n.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, no idea - I will check it in the debugger.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I could not reproduce this error. How do you create links with multiple hard copies?
Author of Total Commander
https://www.ghisler.com
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

2ghisler
Try the tooltip code from my post (MVV's example doesn't work). Then find some DLL file in WinSxS (because of long path) and look at its tooltip.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author), I didn't create that file's links, it is Windows 7 which has a lot of hardlinks inside. But you can create hardlinks e.g. with NTFSLinks tool. Anyway you may test it with C:\Windows\write.exe file if you have Windows 7.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, I could reproduce it with write.exe!
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Great, fixed in TC8b19! :D
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

Confirmed fix in beta 19.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks! I also removed extra empty lines at the end.
Author of Total Commander
https://www.ghisler.com
Post Reply