diff src/spell.c @ 9649:fd9727ae3c49 v7.4.2101

commit https://github.com/vim/vim/commit/2932359000b2f918d5fade79ea4d124d5943cd07 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 24 22:04:11 2016 +0200 patch 7.4.2101 Problem: Looping over windows, buffers and tab pages is inconsistant. Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Sun, 24 Jul 2016 22:15:07 +0200
parents b0c7061d6439
children bff8a09016a5
line wrap: on
line diff
--- a/src/spell.c
+++ b/src/spell.c
@@ -2875,7 +2875,7 @@ spell_free_all(void)
     buf_T	*buf;
 
     /* Go through all buffers and handle 'spelllang'. <VN> */
-    for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+    FOR_ALL_BUFFERS(buf)
 	ga_clear(&buf->b_s.b_langp);
 
     while (first_lang != NULL)
@@ -2911,7 +2911,7 @@ spell_reload(void)
     spell_free_all();
 
     /* Go through all buffers and handle 'spelllang'. */
-    for (wp = firstwin; wp != NULL; wp = wp->w_next)
+    FOR_ALL_WINDOWS(wp)
     {
 	/* Only load the wordlists when 'spelllang' is set and there is a
 	 * window for this buffer in which 'spell' is set. */