Page 1 of 1

LeftHistory/RightHistory: use non-TAB position delimiter

Posted: 2017-10-29, 23:00 UTC
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.

Posted: 2017-10-30, 11:25 UTC
by ghisler(Author)
This would break backwards compatibility, though (using older and newer TC in parallel).

Posted: 2017-10-30, 11:34 UTC
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.

Posted: 2017-10-31, 11:04 UTC
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.

Posted: 2017-10-31, 14:56 UTC
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.

Posted: 2017-11-06, 10:34 UTC
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...

Posted: 2017-11-06, 11:01 UTC
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.

Posted: 2017-11-06, 16:55 UTC
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.