From 2b2f9ccf8c5ace922f0e2682adabea8461b54ea5 Mon Sep 17 00:00:00 2001 From: Jurica Bradaric Date: Tue, 2 Feb 2016 18:52:35 +0100 Subject: 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 --- src/nvim/diff.c | 4 ++-- src/nvim/version.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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) { diff --git a/src/nvim/version.c b/src/nvim/version.c index 88317fa8ee..e46de678c5 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -478,7 +478,7 @@ static int included_patches[] = { 813, // 812, // 811, - // 810, + 810, 809, // 808 NA 807, -- cgit