diff options
author | Anatolii Sakhnik <sakhnik@gmail.com> | 2018-12-09 15:31:22 +0200 |
---|---|---|
committer | Anatolii Sakhnik <sakhnik@gmail.com> | 2018-12-09 19:45:56 +0200 |
commit | 7b6c92eac1b7aa702f734120bdd18b5a4f6cfe04 (patch) | |
tree | 772c85f99dfe923ffb0358ecad3b62613c081393 /src/nvim/misc1.c | |
parent | 972ad1119557a0f72f1907c6758d6ed56438e5b3 (diff) | |
download | rneovim-7b6c92eac1b7aa702f734120bdd18b5a4f6cfe04.tar.gz rneovim-7b6c92eac1b7aa702f734120bdd18b5a4f6cfe04.tar.bz2 rneovim-7b6c92eac1b7aa702f734120bdd18b5a4f6cfe04.zip |
vim-patch:8.1.0394: diffs are not always updated correctly
Problem: Diffs are not always updated correctly.
Solution: When using internal diff update for any changes properly.
https://github.com/vim/vim/commit/e3521d9cbb786806eaff106707851d37d2c0ecef
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index d4a406cdba..d77c196a3a 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -1953,10 +1953,10 @@ changed_lines( { changed_lines_buf(curbuf, lnum, lnume, xtra); - if (xtra == 0 && curwin->w_p_diff) { - /* When the number of lines doesn't change then mark_adjust() isn't - * called and other diff buffers still need to be marked for - * displaying. */ + if (xtra == 0 && curwin->w_p_diff && !diff_internal()) { + // When the number of lines doesn't change then mark_adjust() isn't + // called and other diff buffers still need to be marked for + // displaying. linenr_T wlnum; FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { @@ -2025,6 +2025,10 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra /* mark the buffer as modified */ changed(); + if (curwin->w_p_diff && diff_internal()) { + curtab->tp_diff_update = true; + } + /* set the '. mark */ if (!cmdmod.keepjumps) { RESET_FMARK(&curbuf->b_last_change, ((pos_T) {lnum, col, 0}), 0); |