mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
vim-patch:9.1.1758: Diff mode crashes when adding text property in autocommand (#35760)
Problem: Diff mode crashes when adding text property in autocommand
(after 9.1.1557).
Solution: Only restore ML_EMPTY memline flag, ignore the others
(zeertzjq).
fixes: vim/vim#18288
closes: vim/vim#18291
46e22fd2f7
This commit is contained in:
@@ -874,7 +874,7 @@ static int diff_write(buf_T *buf, diffin_T *din, linenr_T start, linenr_T end)
|
||||
cmdmod.cmod_flags = save_cmod_flags;
|
||||
free_string_option(buf->b_p_ff);
|
||||
buf->b_p_ff = save_ff;
|
||||
buf->b_ml.ml_flags = save_ml_flags;
|
||||
buf->b_ml.ml_flags = (buf->b_ml.ml_flags & ~ML_EMPTY) | (save_ml_flags & ML_EMPTY);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user