[PATCH] edit.c, init_dynamic_edit_buffers (was Re[2]: CR/LF translation)

Alexander Varakin avarakin00 at hotmail.com
Fri Aug 23 01:37:28 UTC 2002


Hi,

Maybe for 4.6 we can apply a very simple and harmless patch which I
attached.
It does the following:
1. All reads and writes will be in binary mode, so  DOS encoded files
corruption under cygwin will be fixed
2. CR  will become visible as ^M and editable, exactly the same way as in
vi.
This will fix a very unpleasant problem with CR in mc editor : CR is not
visible, and it can be very easily embedded into text (by cut and paste) ,
and sometimes this causes very weird problems.
Imagine printf("Hello world\n") with CR between two words - you will never
see this CR in mc editor ,  but the program will print only "world" !

Alex


-------------- next part --------------
A non-text attachment was scrubbed...
Name: CR.patch
Type: application/octet-stream
Size: 5963 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20020822/7766d796/attachment.obj>


More information about the mc-devel mailing list