mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
vim-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 vim/vim#7535)
b3c8b1d254
This commit is contained in:
@@ -3318,7 +3318,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)))) {
|
||||
lnum++; // written the line, count it
|
||||
no_eol = true;
|
||||
|
Reference in New Issue
Block a user