summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2015-08-04 21:51:25 +0200
committerBram Moolenaar <bram@vim.org>2015-08-04 21:51:25 +0200
commit08c2df75f20d81f1477b9b16a1de090c7b60494c (patch)
treec39a67b329fd4d214b0faa89479bb10862dbd3e1
parent7623a18eaad36ee50bec30a12d14107ad744dc24 (diff)
downloadvim-08c2df75f20d81f1477b9b16a1de090c7b60494c.tar.gz
patch 7.4.810v7.4.810v7-4-810
Problem: With a sequence of commands using buffers in diff mode E749 is given. (itchyny) Solution: Skip unloaded buffer. (Hirohito Higashi)
-rw-r--r--src/diff.c4
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/diff.c b/src/diff.c
index ef59e443..03edb3cc 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -804,8 +804,8 @@ ex_diffupdate(eap)
for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
{
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)
continue;
diff_file(tmp_orig, tmp_new, tmp_diff);
diff --git a/src/version.c b/src/version.c
index ee2814f9..7ad08d2f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 810,
+/**/
809,
/**/
808,