User is (should be) King

sir_lichtkind on 2009-11-28T14:47:57

In recent Kephra refactorings, I changed a behaviour of the autoconverter. It works now a bit differently then in common editors, but it is not a big thing. The mindset behind it I find important. It's also very satisfying to see it working in Kephra 0.4.2.9 the way i feel is right.

The topic is EOL, which is the 3 letter acronym for the end of line character, the things you usually name in perl "\r\n". And what is an autoconverter? That is an algorithm that changes a file content while loading it into the editor, before you can touch the text. Don't worry, it will be done only in case you request it by changing the default settings for opened files (file > defaultsettings > open). Sometimes its what you want and I believe in freedom.

However I prefer to notice it, when my editor changes something without asking. I prefer it also to redo this kind of change easily. but please no popups or special widgets or visual noise of any kind.

The solution I found was embarrassingly simple. after loading the file I reset the undo history and make the formater after it, followed by a save call. You will notice that a formater did something, because the redo button has color. normally the button is disabled when you open a file. and if you like, just push the redo button. I love it.

There are many details more ...