Karsten Hopp 96628c
To: vim_dev@googlegroups.com
Karsten Hopp 96628c
Subject: Patch 7.3.437
Karsten Hopp 96628c
Fcc: outbox
Karsten Hopp 96628c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 96628c
Mime-Version: 1.0
Karsten Hopp 96628c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 96628c
Content-Transfer-Encoding: 8bit
Karsten Hopp 96628c
------------
Karsten Hopp 96628c
Karsten Hopp 96628c
Patch 7.3.437
Karsten Hopp 96628c
Problem:    Continue looping inside FOR_ALL_TAB_WINDOWS even when already done.
Karsten Hopp 96628c
Solution:   Use goto instead of break. (Hirohito Higashi)
Karsten Hopp 96628c
Files:      src/fileio.c, src/globals.h
Karsten Hopp 96628c
Karsten Hopp 96628c
Karsten Hopp 96628c
*** ../vim-7.3.436/src/fileio.c	2011-09-02 11:56:15.000000000 +0200
Karsten Hopp 96628c
--- src/fileio.c	2012-02-11 23:40:23.000000000 +0100
Karsten Hopp 96628c
***************
Karsten Hopp 96628c
*** 8898,8907 ****
Karsten Hopp 96628c
  		    if (tp != curtab)
Karsten Hopp 96628c
  			goto_tabpage_tp(tp);
Karsten Hopp 96628c
  		    win_goto(aucmd_win);
Karsten Hopp 96628c
! 		    break;
Karsten Hopp 96628c
  		}
Karsten Hopp 96628c
  	    }
Karsten Hopp 96628c
  	}
Karsten Hopp 96628c
  
Karsten Hopp 96628c
  	/* Remove the window and frame from the tree of frames. */
Karsten Hopp 96628c
  	(void)winframe_remove(curwin, &dummy, NULL);
Karsten Hopp 96628c
--- 8898,8908 ----
Karsten Hopp 96628c
  		    if (tp != curtab)
Karsten Hopp 96628c
  			goto_tabpage_tp(tp);
Karsten Hopp 96628c
  		    win_goto(aucmd_win);
Karsten Hopp 96628c
! 		    goto win_found;
Karsten Hopp 96628c
  		}
Karsten Hopp 96628c
  	    }
Karsten Hopp 96628c
  	}
Karsten Hopp 96628c
+ win_found:
Karsten Hopp 96628c
  
Karsten Hopp 96628c
  	/* Remove the window and frame from the tree of frames. */
Karsten Hopp 96628c
  	(void)winframe_remove(curwin, &dummy, NULL);
Karsten Hopp 96628c
*** ../vim-7.3.436/src/globals.h	2012-02-04 23:34:57.000000000 +0100
Karsten Hopp 96628c
--- src/globals.h	2012-02-11 23:43:45.000000000 +0100
Karsten Hopp 96628c
***************
Karsten Hopp 96628c
*** 535,540 ****
Karsten Hopp 96628c
--- 535,544 ----
Karsten Hopp 96628c
  EXTERN win_T	*prevwin INIT(= NULL);	/* previous window */
Karsten Hopp 96628c
  # define W_NEXT(wp) ((wp)->w_next)
Karsten Hopp 96628c
  # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
Karsten Hopp 96628c
+ /*
Karsten Hopp 96628c
+  * When using this macro "break" only breaks out of the inner loop. Use "goto"
Karsten Hopp 96628c
+  * to break out of the tabpage loop.
Karsten Hopp 96628c
+  */
Karsten Hopp 96628c
  # define FOR_ALL_TAB_WINDOWS(tp, wp) \
Karsten Hopp 96628c
      for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
Karsten Hopp 96628c
  	for ((wp) = ((tp) == curtab) \
Karsten Hopp 96628c
*** ../vim-7.3.436/src/version.c	2012-02-11 20:44:01.000000000 +0100
Karsten Hopp 96628c
--- src/version.c	2012-02-11 23:40:47.000000000 +0100
Karsten Hopp 96628c
***************
Karsten Hopp 96628c
*** 716,717 ****
Karsten Hopp 96628c
--- 716,719 ----
Karsten Hopp 96628c
  {   /* Add new patch number below this line */
Karsten Hopp 96628c
+ /**/
Karsten Hopp 96628c
+     437,
Karsten Hopp 96628c
  /**/
Karsten Hopp 96628c
Karsten Hopp 96628c
-- 
Karsten Hopp 96628c
The future isn't what it used to be.
Karsten Hopp 96628c
Karsten Hopp 96628c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 96628c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 96628c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 96628c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///