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

patch 8.0.1361: some users don't want to diff with hidden buffers

Problem:    Some users don't want to diff with hidden buffers.
Solution:   Add the "hiddenoff" item to 'diffopt'. (Alisue, closes #2394)
This commit is contained in:
Bram Moolenaar
2017-12-01 20:35:58 +01:00
parent 76bb7196f5
commit 97ce419201
6 changed files with 49 additions and 0 deletions

View File

@@ -593,6 +593,11 @@ aucmd_abort:
if (buf->b_nwindows > 0)
--buf->b_nwindows;
#ifdef FEAT_DIFF
if (diffopt_hiddenoff() && !unload_buf && buf->b_nwindows == 0)
diff_buf_delete(buf); /* Clear 'diff' for hidden buffer. */
#endif
/* Return when a window is displaying the buffer or when it's not
* unloaded. */
if (buf->b_nwindows > 0 || !unload_buf)