aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-02-03 06:25:49 +0900
committerwatiko <service@mail.watiko.net>2016-02-03 06:38:38 +0900
commitf104ce2d15862c2207f6960e611a65562d49e3f0 (patch)
tree90ac5d12ab52a6a2516b98239bf03d6b46b7751b /src/nvim/fileio.c
parent5308585adf8140e232602c96e22909371736d826 (diff)
downloadrneovim-f104ce2d15862c2207f6960e611a65562d49e3f0.tar.gz
rneovim-f104ce2d15862c2207f6960e611a65562d49e3f0.tar.bz2
rneovim-f104ce2d15862c2207f6960e611a65562d49e3f0.zip
vim-patch:7.4.643
Problem: Using the default file format for Mac files. (Issue 77) Solution: Reset the try_mac counter in the right place. (Oswald) https://github.com/vim/vim/commit/c6b7217ff502b8fc28d6c861d25c1943e30973ad
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index badb5b85b0..90987d0b3d 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -1543,12 +1543,12 @@ rewind_retry:
if (fileformat == EOL_UNKNOWN) {
/* First try finding a NL, for Dos and Unix */
if (try_dos || try_unix) {
- for (p = ptr; p < ptr + size; ++p) {
- // Reset the carriage return counter.
- if (try_mac) {
- try_mac = 1;
- }
+ // Reset the carriage return counter.
+ if (try_mac) {
+ try_mac = 1;
+ }
+ for (p = ptr; p < ptr + size; ++p) {
if (*p == NL) {
if (!try_unix
|| (try_dos && p > ptr && p[-1] == CAR))