Mercurial > vim
diff src/buffer.c @ 18987:e378907d79bf v8.2.0054
patch 8.2.0054: :diffget and :diffput don't have good completion
Commit: https://github.com/vim/vim/commit/ae7dba896975051a3f0b7123faa08dac5635972d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 29 13:56:33 2019 +0100
patch 8.2.0054: :diffget and :diffput don't have good completion
Problem: :diffget and :diffput don't have good completion.
Solution: Add proper completion. (Dominique Pelle, closes https://github.com/vim/vim/issues/5409)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 29 Dec 2019 14:00:04 +0100 |
parents | 5c405689da3e |
children | 847cc7932c42 |
line wrap: on
line diff
--- 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) {