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 #5409)
diff --git a/src/buffer.c b/src/buffer.c
index 740d31b..2502dee 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2702,6 +2702,15 @@
{
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)
{