LeftHistory/RightHistory: use non-TAB position delimiter

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

LeftHistory/RightHistory: use non-TAB position delimiter

Post by *Flint »

TC uses TAB in the sections LeftHistory/RightHistory for separating path from the cursor position. The problem is, some text editors may be configured to automatically replace TABs with spaces, so if anybody uses such editor to edit wincmd.ini, all cursor positions will be completely broken.

I'd suggest to use some alternative non-whitespace character as delimiter, for example, vertical line symbol which is forbidden in Windows file names.

To ensure backwards compatibility, TC could support reading both TAB and vertical line, but write new INI contents with vertical lines only.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This would break backwards compatibility, though (using older and newer TC in parallel).
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
I think it's called forward compatibility (old application using new data), backward will be OK.

Yes, forward compatibility will break, but it's only significant for 9.x. Normally if users have to run two versions of TC it's because something seriously changed that broke their scenarios. But then it should be some really old version. 9.10 and 9.0x are very similar, so there's little need to have them both at the same time. And versions older than 9.0x are already incompatible, in any case.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The tab was especially used to get compatibility in both directions. The names will be lost when saving the history with an older version, but the history will satill work.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

So, what you mean is, older TC for some reason already skipped TAB symbols and everything after them, and so this helped you maintain forward compatibility which would not work with any other delimiter, is that right?

In this case, OK, I agree it's not worth changing.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It is a quite strange text editor BTW if it removes tabs in the middle of text lines in INI format that doesn't need any indentation...
User avatar
petermad
Power Member
Power Member
Posts: 14743
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Hmm, my text editor is set up to replace a tab-keypress with 2 space-characters, but already existing tabs are left as they are.
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
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

MVV
Good editors allow to configure all this behaviour. I can easily imagine somebody who configured his editor to do the replacement. For example if he is a Python developer, this might be a way to avoid TAB/space indent fuss. Or there are many developers who simply hate TABs and only use spaces everywhere. And if they don't use editor much outside of work they might not bother with file types, just make it all alike.

Probably, not the most common scenario, but still quite possible.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
Post Reply