Closed GoogleCodeExporter closed 9 years ago
Revised reproduction steps:
1. echo -n "set ffs=unix,dos,mac" > oneline.txt
2. vim -u oneline.txt oneline.txt
3. set ff?
Original comment by esw...@gmail.com
on 5 Nov 2012 at 9:36
Original comment by chrisbr...@googlemail.com
on 9 Jan 2015 at 12:16
Issue 331 has been merged into this issue.
Original comment by chrisbr...@googlemail.com
on 13 Feb 2015 at 11:29
Updated minimal patch available at
https://github.com/chrisbra/vim-mq-patches/blob/master/issue71_minimal
(okay, the name is misleading. I thought it was issue71)....
Original comment by chrisbr...@googlemail.com
on 13 Feb 2015 at 5:57
included and Fixed by 7.4.635
Original comment by chrisbr...@googlemail.com
on 17 Feb 2015 at 3:34
Moving the try_mac reset to inside the for loop seems to defeat its purpose,
making mac format (nearly) impossible to choose if unix or dos is listed first
in ffs. Was that intended?
Original comment by esw...@gmail.com
on 17 Feb 2015 at 7:13
Can you give an example of where you would expect mac format to be detected but
it doesn't work?
Original comment by brammool...@gmail.com
on 19 Feb 2015 at 7:26
Any file that either a) doesn't end with a carriage return, or b) is larger
than the initial read buffer, and doesn't happen to have a carriage return in
exactly the right place. For example:
$ printf 'one\rtwo\rthree' > maclines
$ echo 'set ffs=dos,mac' > vimrc
$ vim -u vimrc maclines
As of version 7.4.640, this file is set to dos format; the attached patch
(issue-77-repair.diff) fixes this.
I apologize for failing to notice the subtle difference between the original
and updated minimal patches before it was merged.
Original comment by esw...@gmail.com
on 20 Feb 2015 at 12:55
Attachments:
Thanks for the patch. Can you please add a test for what you are fixing?
It probably fits in test30.
Original comment by brammool...@gmail.com
on 20 Feb 2015 at 6:50
> I apologize for failing to notice the subtle difference between the original
and updated minimal patches before it was merged.
That might have been my fault. I had to merge this manually, as the patch did
not apply cleanly and I might have made a mistake here. I apologize for that.
Original comment by chrisbr...@googlemail.com
on 20 Feb 2015 at 9:06
Patch with test cases for both the original problem and the new problem. I've
also highlighted a related potential issue in the existing cases, where a file
with Unix and Mac line endings will be set to Dos format when ffs=dos,mac; is
that intended?
Original comment by esw...@gmail.com
on 21 Feb 2015 at 1:28
Attachments:
Original issue reported on code.google.com by
esw...@gmail.com
on 20 Jul 2012 at 7:41Attachments: