diff src/quickfix.c @ 19934:3ff714d765ba v8.2.0523

patch 8.2.0523: loops are repeated Commit: https://github.com/vim/vim/commit/00d253e2b2f435a5386582c3f857008e7ac355c2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 6 22:13:01 2020 +0200 patch 8.2.0523: loops are repeated Problem: Loops are repeated. Solution: Use FOR_ALL_ macros. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5882)
author Bram Moolenaar <Bram@vim.org>
date Mon, 06 Apr 2020 22:15:39 +0200
parents 435726a03481
children aadd1cae2ff5
line wrap: on
line diff
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -6276,7 +6276,7 @@ wipe_dummy_buffer(buf_T *buf, char_u *di
 	win_T	    *wp;
 
 	if (firstwin->w_next != NULL)
-	    for (wp = firstwin; wp != NULL; wp = wp->w_next)
+	    FOR_ALL_WINDOWS(wp)
 		if (wp->w_buffer == buf)
 		{
 		    if (win_close(wp, FALSE) == OK)