diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-13 18:04:39 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-13 18:17:25 -0500 |
commit | 54cd7298f8aa6adfa5a629b13ecb71b7779798bd (patch) | |
tree | 87e43c1069dc189a241f8fb834cb28871a0ef47f /src/nvim/buffer.c | |
parent | fd44bd4d4feb884460fd9f023b162f5ee166aae0 (diff) | |
download | rneovim-54cd7298f8aa6adfa5a629b13ecb71b7779798bd.tar.gz rneovim-54cd7298f8aa6adfa5a629b13ecb71b7779798bd.tar.bz2 rneovim-54cd7298f8aa6adfa5a629b13ecb71b7779798bd.zip |
vim-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 vim/vim#5409)
https://github.com/vim/vim/commit/ae7dba896975051a3f0b7123faa08dac5635972d
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 9e097a54a4..6b66d8733e 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -2345,6 +2345,15 @@ int ExpandBufnames(char_u *pat, int *num_file, char_u ***file, int options) if (!buf->b_p_bl) { // skip unlisted buffers continue; } + 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; + } + } p = buflist_match(®match, buf, p_wic); if (p != NULL) { if (round == 1) { |