diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-08-19 23:49:25 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-08-19 23:49:25 -0400 |
commit | e1c330a486c184152cb48d637c6d04caba5290bd (patch) | |
tree | b2379cae30ea446456681d1dc62d80ef95345f69 /src/nvim/misc1.c | |
parent | 0b7bff5bb71ddc2e9c41863ec41b9aea74d0fe75 (diff) | |
parent | 888a31ba454cf9c054527a26459c112593efa54b (diff) | |
download | rneovim-e1c330a486c184152cb48d637c6d04caba5290bd.tar.gz rneovim-e1c330a486c184152cb48d637c6d04caba5290bd.tar.bz2 rneovim-e1c330a486c184152cb48d637c6d04caba5290bd.zip |
Merge pull request #1024 from war1025/dev/for_all_buffers
Add FOR_ALL_BUFFERS helper
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 6ba1e68d64..f0c4ee492e 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -3329,8 +3329,6 @@ void prepare_to_exit(void) */ void preserve_exit(void) { - buf_T *buf; - // Prevent repeated calls into this method. if (really_exiting) { exit(2); @@ -3346,7 +3344,7 @@ void preserve_exit(void) ml_close_notmod(); /* close all not-modified buffers */ - for (buf = firstbuf; buf != NULL; buf = buf->b_next) { + FOR_ALL_BUFFERS(buf) { if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL) { OUT_STR("Vim: preserving files...\n"); screen_start(); /* don't know where cursor is now */ |