aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorJurica Bradaric <jbradaric@gmail.com>2016-02-02 18:52:35 +0100
committerJurica Bradaric <jbradaric@gmail.com>2016-02-02 18:54:09 +0100
commit2b2f9ccf8c5ace922f0e2682adabea8461b54ea5 (patch)
tree832117931649fdc813d05c97905b79b0745be64b /src/nvim/diff.c
parentcfce719c66b22f26e9f8def87c2b14d339208482 (diff)
downloadrneovim-2b2f9ccf8c5ace922f0e2682adabea8461b54ea5.tar.gz
rneovim-2b2f9ccf8c5ace922f0e2682adabea8461b54ea5.tar.bz2
rneovim-2b2f9ccf8c5ace922f0e2682adabea8461b54ea5.zip
vim-patch:7.4.810
Problem: With a sequence of commands using buffers in diff mode E749 is given. (itchyny) Solution: Skip unloaded buffer. (Hirohito Higashi) https://github.com/vim/vim/commit/9dd33af4baf5fd7d3a7a779d8363834b38804946
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index ce79158050..2776e45f5d 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -763,8 +763,8 @@ void ex_diffupdate(exarg_T *eap)
// Make a difference between the first buffer and every other.
for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new) {
buf_T *buf = curtab->tp_diffbuf[idx_new];
- if (buf == NULL) {
- continue;
+ if (buf == NULL || buf->b_ml.ml_mfp == NULL) {
+ continue; // skip buffer that isn't loaded
}
if (diff_write(buf, tmp_new) == FAIL) {