mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
Merge #3443 'vim-patch:7.4.{785,795,898}'
This commit is contained in:
@@ -1922,10 +1922,10 @@ failed:
|
||||
check_marks_read();
|
||||
|
||||
/*
|
||||
* Trick: We remember if the last line of the read didn't have
|
||||
* an eol even when 'binary' is off, for when writing it again with
|
||||
* 'binary' on. This is required for
|
||||
* ":autocmd FileReadPost *.gz set bin|'[,']!gunzip" to work.
|
||||
* We remember if the last line of the read didn't have
|
||||
* an eol even when 'binary' is off, to support turning 'fixeol' off,
|
||||
* or writing the read again with 'binary' on. The latter is required
|
||||
* for ":autocmd FileReadPost *.gz set bin|'[,']!gunzip" to work.
|
||||
*/
|
||||
curbuf->b_no_eol_lnum = read_no_eol_lnum;
|
||||
|
||||
@@ -3310,7 +3310,7 @@ restore_backup:
|
||||
/* write failed or last line has no EOL: stop here */
|
||||
if (end == 0
|
||||
|| (lnum == end
|
||||
&& write_bin
|
||||
&& (write_bin || !buf->b_p_fixeol)
|
||||
&& (lnum == buf->b_no_eol_lnum
|
||||
|| (lnum == buf->b_ml.ml_line_count && !buf->b_p_eol)))) {
|
||||
++lnum; /* written the line, count it */
|
||||
|
Reference in New Issue
Block a user