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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user