diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-09-05 09:45:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 09:45:14 +0200 |
commit | 55a721512b695db47c6c0a792b767a1c850b01fc (patch) | |
tree | fa3f76da5189581a12ecacc7a8e42b4640ebeac5 /src/nvim/ex_cmds2.c | |
parent | bfe82d465035a1b792c4a17d7f7a759b61205e15 (diff) | |
parent | 958467456930badcaf218b6fac56b105ac7655c8 (diff) | |
download | rneovim-55a721512b695db47c6c0a792b767a1c850b01fc.tar.gz rneovim-55a721512b695db47c6c0a792b767a1c850b01fc.tar.bz2 rneovim-55a721512b695db47c6c0a792b767a1c850b01fc.zip |
Merge #8953 from janlazo/vim-8.0.1190
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index f5822535ba..6e695a8897 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -1209,7 +1209,7 @@ int autowrite(buf_T *buf, int forceit) return r; } -/// flush all buffers, except the ones that are readonly +/// Flush all buffers, except the ones that are readonly or are never written. void autowrite_all(void) { if (!(p_aw || p_awa) || !p_write) { @@ -1217,7 +1217,7 @@ void autowrite_all(void) } FOR_ALL_BUFFERS(buf) { - if (bufIsChanged(buf) && !buf->b_p_ro) { + if (bufIsChanged(buf) && !buf->b_p_ro && !bt_dontwrite(buf)) { bufref_T bufref; set_bufref(&bufref, buf); (void)buf_write_all(buf, false); |