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)
ae7dba8969
This commit is contained in:
Jan Edmund Lazo
2021-02-13 18:04:39 -05:00
parent fd44bd4d4f
commit 54cd7298f8
7 changed files with 65 additions and 1 deletions

View File

@@ -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(&regmatch, buf, p_wic);
if (p != NULL) {
if (round == 1) {