diff src/ex_docmd.c @ 15227:95678f27a704 v8.1.0623

patch 8.1.0623: iterating through window frames is repeated commit https://github.com/vim/vim/commit/3d1491ed2394b3e92902102879bace28a5f9c201 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 22 17:07:50 2018 +0100 patch 8.1.0623: iterating through window frames is repeated Problem: Iterating through window frames is repeated. Solution: Define FOR_ALL_FRAMES. (Yegappan Lakshmanan)
author Bram Moolenaar <Bram@vim.org>
date Sat, 22 Dec 2018 17:15:05 +0100
parents 2d8c31ae1e24
children db5d2429bda3
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -11688,7 +11688,7 @@ ses_skipframe(frame_T *fr)
 {
     frame_T	*frc;
 
-    for (frc = fr; frc != NULL; frc = frc->fr_next)
+    FOR_ALL_FRAMES(frc, fr)
 	if (ses_do_frame(frc))
 	    break;
     return frc;
@@ -11705,7 +11705,7 @@ ses_do_frame(frame_T *fr)
 
     if (fr->fr_layout == FR_LEAF)
 	return ses_do_win(fr->fr_win);
-    for (frc = fr->fr_child; frc != NULL; frc = frc->fr_next)
+    FOR_ALL_FRAMES(frc, fr->fr_child)
 	if (ses_do_frame(frc))
 	    return TRUE;
     return FALSE;