When the current window is greater than one and another tab page exists with 
only one window, loading the session causes an error. The variable tracking the 
current window number in 'makeopens' is not reset for each tab page.

To reproduce (tested in 7.4.692):

vim -u NONE -i NONE -N ~/.vimrc -c 'wincmd s' -c 'wincmd v' -c 'wincmd T' -c 
'normal 1gt' -c '2wincmd w' -c 'mks! ~/test.vis' -c 'qa'; vim -u NONE -i NONE 
-N -S ~/test.vis

Patch to fix the problem:

diff --git a/src/ex_docmd.c b/src/ex_docmd.c
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10845,7 +10845,6 @@
     buf_T      *buf;
     int                only_save_windows = TRUE;
     int                nr;
-    int                cnr = 1;
     int                restore_size = TRUE;
     win_T      *wp;
     char_u     *sname;
@@ -10984,6 +10983,7 @@
     for (tabnr = 1; ; ++tabnr)
     {
        int  need_tabnew = FALSE;
+       int  cnr = 1;
 
        if ((ssop_flags & SSOP_TABPAGES))
        {

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10845,7 +10845,6 @@
     buf_T	*buf;
     int		only_save_windows = TRUE;
     int		nr;
-    int		cnr = 1;
     int		restore_size = TRUE;
     win_T	*wp;
     char_u	*sname;
@@ -10984,6 +10983,7 @@
     for (tabnr = 1; ; ++tabnr)
     {
 	int  need_tabnew = FALSE;
+	int  cnr = 1;
 
 	if ((ssop_flags & SSOP_TABPAGES))
 	{

Raspunde prin e-mail lui