diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-29 13:56:33 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-29 13:56:33 +0100 |
commit | ae7dba896975051a3f0b7123faa08dac5635972d (patch) | |
tree | 4535b38de33959b00eccc8a18194fe6e83d3f353 /src/buffer.c | |
parent | e20e68b40d9572393bb3577d6a0b52e960950b57 (diff) |
patch 8.2.0054: :diffget and :diffput don't have good completionv8.2.0054
Problem: :diffget and :diffput don't have good completion.
Solution: Add proper completion. (Dominique Pelle, closes #5409)
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 740d31b91b..2502dee627 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2702,6 +2702,15 @@ ExpandBufnames( { if (!buf->b_p_bl) // skip unlisted buffers continue; +#ifdef FEAT_DIFF + if (options & BUF_DIFF_FILTER) + // Skip buffers not suitable for + // :diffget or :diffput completion. + if (buf == curbuf + || !diff_mode_buf(curbuf) || !diff_mode_buf(buf)) + continue; +#endif + p = buflist_match(®match, buf, p_wic); if (p != NULL) { |