0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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:
Bram Moolenaar
2019-12-30 21:59:03 +01:00
parent 08b28b7ad5
commit efcc329020
3 changed files with 51 additions and 28 deletions

View File

@@ -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