This forum uses cookies. Click X button to hide this message. What is stored? 
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LeftHistory/RightHistory: use non-TAB position delimiter

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC suggestions (English) Printable version
View previous topic :: View next topic  
Author Message
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 3130
Location: Moscow, Russia

PostPosted: Sun Oct 29, 2017 5:00 pm    Post subject: LeftHistory/RightHistory: use non-TAB position delimiter Reply with quote

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, other stuff!
 
Using TC 9.12 / Win7 x32 & x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34704
Location: Switzerland

PostPosted: Mon Oct 30, 2017 5:25 am    Post subject: Reply with quote

This would break backwards compatibility, though (using older and newer TC in parallel).
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 3130
Location: Moscow, Russia

PostPosted: Mon Oct 30, 2017 5:34 am    Post subject: Reply with quote

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, other stuff!
 
Using TC 9.12 / Win7 x32 & x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34704
Location: Switzerland

PostPosted: Tue Oct 31, 2017 5:04 am    Post subject: Reply with quote

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
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 3130
Location: Moscow, Russia

PostPosted: Tue Oct 31, 2017 8:56 am    Post subject: Reply with quote

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, other stuff!
 
Using TC 9.12 / Win7 x32 & x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7915
Location: Russian Federation

PostPosted: Mon Nov 06, 2017 4:34 am    Post subject: Reply with quote

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...
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7322
Location: Valsted, Denmark

PostPosted: Mon Nov 06, 2017 5:01 am    Post subject: Reply with quote

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.
_________________
#524
Danish Total Commander Translator
TC 9.10b1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.81b8 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 3130
Location: Moscow, Russia

PostPosted: Mon Nov 06, 2017 10:55 am    Post subject: Reply with quote

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, other stuff!
 
Using TC 9.12 / Win7 x32 & x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC suggestions (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group