diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-02-20 03:43:38 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-02-20 03:43:38 +0000 |
commit | 602eb74de6245dcad1ec77e919a7597789ef1c0e (patch) | |
tree | 347695173fe68fa22302ba28ca0ce7a2f16f58ad /src/diff.c | |
parent | fa3491a0e0e8c91431583ae18ae9605aac24cc3d (diff) | |
download | vim-602eb74de6245dcad1ec77e919a7597789ef1c0e.zip |
updated for version 7.0-201
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/diff.c b/src/diff.c index daa1f19c2..b6f335415 100644 --- a/src/diff.c +++ b/src/diff.c @@ -2014,6 +2014,7 @@ ex_diffgetput(eap) int start_skip, end_skip; int new_count; int buf_empty; + int found_not_ma = FALSE; /* Find the current buffer in the list of diff buffers. */ idx_cur = diff_buf_idx(curbuf); @@ -2028,13 +2029,19 @@ ex_diffgetput(eap) /* No argument: Find the other buffer in the list of diff buffers. */ for (idx_other = 0; idx_other < DB_COUNT; ++idx_other) if (curtab->tp_diffbuf[idx_other] != curbuf - && curtab->tp_diffbuf[idx_other] != NULL - && (eap->cmdidx != CMD_diffput - || curtab->tp_diffbuf[idx_other]->b_p_ma)) - break; + && curtab->tp_diffbuf[idx_other] != NULL) + { + if (eap->cmdidx != CMD_diffput + || curtab->tp_diffbuf[idx_other]->b_p_ma) + break; + found_not_ma = TRUE; + } if (idx_other == DB_COUNT) { - EMSG(_("E100: No other buffer in diff mode")); + if (found_not_ma) + EMSG(_("E793: No other buffer in diff mode is modifiable")); + else + EMSG(_("E100: No other buffer in diff mode")); return; } |