To: vim_dev@googlegroups.com Subject: Patch 7.4.281 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.281 Problem: When a session file has more than one tabpage and 'showtabline' is one the positions may be slightly off. Solution: Set 'showtabline' to two while positioning windows. Files: src/ex_docmd.c *** ../vim-7.4.280/src/ex_docmd.c 2014-04-29 12:15:22.856032651 +0200 --- src/ex_docmd.c 2014-05-07 21:07:56.249296154 +0200 *************** *** 10290,10295 **** --- 10290,10296 ---- char_u *sname; win_T *edited_win = NULL; int tabnr; + int restore_stal = FALSE; win_T *tab_firstwin; frame_T *tab_topframe; int cur_arg_idx = 0; *************** *** 10399,10404 **** --- 10400,10418 ---- #endif /* + * When there are two or more tabpages and 'showtabline' is 1 the tabline + * will be displayed when creating the next tab. That resizes the windows + * in the first tab, which may cause problems. Set 'showtabline' to 2 + * temporarily to avoid that. + */ + if (p_stal == 1 && first_tabpage->tp_next != NULL) + { + if (put_line(fd, "set stal=2") == FAIL) + return FAIL; + restore_stal = TRUE; + } + + /* * May repeat putting Windows for each tab, when "tabpages" is in * 'sessionoptions'. * Don't use goto_tabpage(), it may change directory and trigger *************** *** 10548,10553 **** --- 10562,10569 ---- || put_eol(fd) == FAIL) return FAIL; } + if (restore_stal && put_line(fd, "set stal=1") == FAIL) + return FAIL; /* * Wipe out an empty unnamed buffer we started in. *** ../vim-7.4.280/src/version.c 2014-05-07 20:25:30.845273872 +0200 --- src/version.c 2014-05-07 21:11:24.925297981 +0200 *************** *** 736,737 **** --- 736,739 ---- { /* Add new patch number below this line */ + /**/ + 281, /**/ -- hundred-and-one symptoms of being an internet addict: 122. You ask if the Netaholics Anonymous t-shirt you ordered can be sent to you via e-mail. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///