summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2014-05-07 21:14:47 +0200
committerBram Moolenaar <bram@vim.org>2014-05-07 21:14:47 +0200
commit0602e1dec70515d267a8c50f46e13ecb7fb61ffd (patch)
treeac7fb028a7c4c2df81728af4e2329f3e54140cd1
parentdcbd3c6db20126737be369df47d90c71eac468d6 (diff)
downloadvim-0602e1dec70515d267a8c50f46e13ecb7fb61ffd.tar.gz
updated for version 7.4.281v7.4.281v7-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.
-rw-r--r--src/ex_docmd.c16
-rw-r--r--src/version.c2
2 files changed, 18 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index a88cdd56..a7df2c31 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10290,6 +10290,7 @@ makeopens(fd, dirnow)
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,6 +10400,19 @@ makeopens(fd, dirnow)
#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,6 +10562,8 @@ makeopens(fd, dirnow)
|| 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.
diff --git a/src/version.c b/src/version.c
index 818a8b5c..6da67a18 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 281,
+/**/
280,
/**/
279,