patch 8.2.2199: first write after setting 'eol' does not have NL added
Problem: First write after setting 'eol' does not have NL added. (Tomáš
Janoušek)
Solution: Only use b_no_eol_lnum when doing a binary write. (closes #7535)
This commit is contained in:
@ -2031,7 +2031,7 @@ restore_backup:
|
||||
if (end == 0
|
||||
|| (lnum == end
|
||||
&& (write_bin || !buf->b_p_fixeol)
|
||||
&& (lnum == buf->b_no_eol_lnum
|
||||
&& ((write_bin && lnum == buf->b_no_eol_lnum)
|
||||
|| (lnum == buf->b_ml.ml_line_count
|
||||
&& !buf->b_p_eol))))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user