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/normal.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/normal.c')
-rw-r--r-- | src/nvim/normal.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index f87de52a82..38ee0936aa 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1325,6 +1325,14 @@ static int normal_check(VimState *state) normal_check_cursor_moved(s); normal_check_text_changed(s); + // Updating diffs from changed() does not always work properly, + // esp. updating folds. Do an update just before redrawing if + // needed. + if (curtab->tp_diff_update || curtab->tp_diff_invalid) { + ex_diffupdate(NULL); + curtab->tp_diff_update = false; + } + // Scroll-binding for diff mode may have been postponed until // here. Avoids doing it for every change. if (diff_need_scrollbind) { |