| To: vim-dev@vim.org |
| Subject: patch 7.0.201 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.0.201 |
| Problem: Message for ":diffput" about buffer not being in diff mode may be |
| wrong. |
| Solution: Check for buffer in diff mode but not modifiable. |
| Files: src/diff.c |
| |
| |
| |
| |
| |
| *** 2014,2019 **** |
| --- 2014,2020 ---- |
| 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,2040 **** |
| /* 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; |
| if (idx_other == DB_COUNT) |
| { |
| ! EMSG(_("E100: No other buffer in diff mode")); |
| return; |
| } |
| |
| --- 2029,2047 ---- |
| /* 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) |
| ! { |
| ! if (eap->cmdidx != CMD_diffput |
| ! || curtab->tp_diffbuf[idx_other]->b_p_ma) |
| ! break; |
| ! found_not_ma = TRUE; |
| ! } |
| if (idx_other == DB_COUNT) |
| { |
| ! if (found_not_ma) |
| ! EMSG(_("E793: No other buffer in diff mode is modifiable")); |
| ! else |
| ! EMSG(_("E100: No other buffer in diff mode")); |
| return; |
| } |
| |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 201, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 159. You get excited whenever discussing your hard drive. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |