comparison src/os_win32.c @ 6933:62ba356c2d4e v7.4.785

patch 7.4.785 Problem: On some systems automatically adding the missing EOL causes problems. Setting 'binary' has too many side effects. Solution: Add the 'fixeol' option, default on. (Pavel Samarkin)
author Bram Moolenaar <bram@vim.org>
date Fri, 17 Jul 2015 14:18:08 +0200
parents 43a07fa78155
children f77d1f32c357
comparison
equal deleted inserted replaced
6932:727f3fececd8 6933:62ba356c2d4e
4171 if (len == (int)l) 4171 if (len == (int)l)
4172 { 4172 {
4173 /* Finished a line, add a NL, unless this line should not have 4173 /* Finished a line, add a NL, unless this line should not have
4174 * one. */ 4174 * one. */
4175 if (lnum != curbuf->b_op_end.lnum 4175 if (lnum != curbuf->b_op_end.lnum
4176 || !curbuf->b_p_bin 4176 || (!curbuf->b_p_bin
4177 && curbuf->b_p_fixeol)
4177 || (lnum != curbuf->b_no_eol_lnum 4178 || (lnum != curbuf->b_no_eol_lnum
4178 && (lnum != curbuf->b_ml.ml_line_count 4179 && (lnum != curbuf->b_ml.ml_line_count
4179 || curbuf->b_p_eol))) 4180 || curbuf->b_p_eol)))
4180 { 4181 {
4181 WriteFile(g_hChildStd_IN_Wr, "\n", 1, (LPDWORD)&ignored, NULL); 4182 WriteFile(g_hChildStd_IN_Wr, "\n", 1, (LPDWORD)&ignored, NULL);