diff options
author | James McCoy <jamessan@jamessan.com> | 2017-03-10 16:13:37 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-03-11 20:32:09 -0500 |
commit | 564e9dc17fd53ab6cb1bc63a55dba2df9538a31f (patch) | |
tree | 40c382cf733ab05a3d6c51dd684253ddce7b2cf9 /src/nvim/option.c | |
parent | 5674057e3a5597f792a077d714bd7d32af81bfc8 (diff) | |
download | rneovim-564e9dc17fd53ab6cb1bc63a55dba2df9538a31f.tar.gz rneovim-564e9dc17fd53ab6cb1bc63a55dba2df9538a31f.tar.bz2 rneovim-564e9dc17fd53ab6cb1bc63a55dba2df9538a31f.zip |
vim-patch:7.4.2101
Problem: Looping over windows, buffers and tab pages is inconsistant.
Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/2932359000b2f918d5fade79ea4d124d5943cd07
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 322be8aaa0..ba0a501c4a 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3623,7 +3623,8 @@ set_bool_option ( char_u hash[UNDO_HASH_SIZE]; buf_T *save_curbuf = curbuf; - for (curbuf = firstbuf; curbuf != NULL; curbuf = curbuf->b_next) { + FOR_ALL_BUFFERS(bp) { + curbuf = bp; /* When 'undofile' is set globally: for every buffer, otherwise * only for the current buffer: Try to read in the undofile, * if one exists, the buffer wasn't changed and the buffer was |