forked from aniani/vim
patch 8.2.0064: diffmode completion doesn't use per-window setting
Problem: Diffmode completion doesn't use per-window setting. Solution: Check if a window is in diff mode. (Dominique Pell, closes #5419)
This commit is contained in:
@@ -2661,6 +2661,11 @@ ExpandBufnames(
|
||||
*num_file = 0; // return values in case of FAIL
|
||||
*file = NULL;
|
||||
|
||||
#ifdef FEAT_DIFF
|
||||
if ((options & BUF_DIFF_FILTER) && !curwin->w_p_diff)
|
||||
return FAIL;
|
||||
#endif
|
||||
|
||||
// Make a copy of "pat" and change "^" to "\(^\|[\/]\)".
|
||||
if (*pat == '^')
|
||||
{
|
||||
@@ -2706,8 +2711,7 @@ ExpandBufnames(
|
||||
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))
|
||||
if (buf == curbuf || !diff_mode_buf(buf))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user