diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-01-27 23:23:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 23:23:26 +0000 |
commit | 815aa9f6425b34f1857a5b4213dff0dce6dda2b9 (patch) | |
tree | 90b5b1c6a02452712e93133f48328dc0e41bc72b /src/nvim/diff.c | |
parent | 14751eaf70c6c0e55a9c2ec1ba3e4540a7e2d87f (diff) | |
parent | d8adb3a72122aa36571acdff552dddf7aff3d4ff (diff) | |
download | rneovim-815aa9f6425b34f1857a5b4213dff0dce6dda2b9.tar.gz rneovim-815aa9f6425b34f1857a5b4213dff0dce6dda2b9.tar.bz2 rneovim-815aa9f6425b34f1857a5b4213dff0dce6dda2b9.zip |
Merge pull request #16820 from seandewar/vim-8.1.2302
vim-patch:8.1.2302,8.2.{3936,4112}
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 340fec230c..233753839b 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -790,9 +790,14 @@ static int diff_write(buf_T *buf, diffin_T *din) // Always use 'fileformat' set to "unix". char_u *save_ff = buf->b_p_ff; buf->b_p_ff = vim_strsave((char_u *)FF_UNIX); + const bool save_lockmarks = cmdmod.lockmarks; + // Writing the buffer is an implementation detail of performing the diff, + // so it shouldn't update the '[ and '] marks. + cmdmod.lockmarks = true; int r = buf_write(buf, din->din_fname, NULL, (linenr_T)1, buf->b_ml.ml_line_count, NULL, false, false, false, true); + cmdmod.lockmarks = save_lockmarks; free_string_option(buf->b_p_ff); buf->b_p_ff = save_ff; return r; |