aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-02-09 01:58:54 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-02-09 01:58:54 -0500
commitb9701c2a2b7b4633e894ad62955e0a0039dc0f95 (patch)
tree970a236df8b1ab30b5866487ff00f4e49c7c71bf /src/nvim/diff.c
parent17ae27190d4589b2a35f44bc6c8b552f4bf06d4e (diff)
parent52692d3cd3e682a4116d3cec1fcf05880f0c77a1 (diff)
downloadrneovim-b9701c2a2b7b4633e894ad62955e0a0039dc0f95.tar.gz
rneovim-b9701c2a2b7b4633e894ad62955e0a0039dc0f95.tar.bz2
rneovim-b9701c2a2b7b4633e894ad62955e0a0039dc0f95.zip
Merge #4152 'vim-patch:7.4.{798,800,805,810,811,814,815,816,817,820,825}'.
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 94c5712163..e06ffd0bbc 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) {