diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-08-04 21:51:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-08-04 21:51:25 +0200 |
commit | 9dd33af4baf5fd7d3a7a779d8363834b38804946 (patch) | |
tree | c0854f3a0b36a0cd358b475bc94471171ab3859f /src/diff.c | |
parent | 75e641354645b62fbf171231ebf71f046489cf17 (diff) | |
download | vim-git-9dd33af4baf5fd7d3a7a779d8363834b38804946.tar.gz |
patch 7.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)
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/diff.c b/src/diff.c index ef59e4437..03edb3cca 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); |