diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-30 21:59:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-30 21:59:03 +0100 |
commit | efcc329020ef089267f5f3994b8544eb58806311 (patch) | |
tree | ab8cb40fbc657f8642050905fb0771d7e70b99e5 /src/buffer.c | |
parent | 08b28b7ad52d5ee3cb5fa5982b647e325a410484 (diff) | |
download | vim-git-efcc329020ef089267f5f3994b8544eb58806311.tar.gz |
patch 8.2.0064: diffmode completion doesn't use per-window settingv8.2.0064
Problem: Diffmode completion doesn't use per-window setting.
Solution: Check if a window is in diff mode. (Dominique Pell, closes #5419)
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c index dd3593fb5..eb6b28772 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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 |