Skip to content
Snippets Groups Projects
Commit 98ea5def authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

updated for version 7.0198

parent 1d2ba7fa
No related merge requests found
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
static int path_is_url __ARGS((char_u *p)); static int path_is_url __ARGS((char_u *p));
#if defined(FEAT_WINDOWS) || defined(PROTO) #if defined(FEAT_WINDOWS) || defined(PROTO)
static int win_split_ins __ARGS((int size, int flags, win_T *newwin, int dir)); static int win_split_ins __ARGS((int size, int flags, win_T *newwin, int dir));
static int win_comp_pos __ARGS((void));
static void frame_comp_pos __ARGS((frame_T *topfrp, int *row, int *col)); static void frame_comp_pos __ARGS((frame_T *topfrp, int *row, int *col));
static void frame_setheight __ARGS((frame_T *curfrp, int height)); static void frame_setheight __ARGS((frame_T *curfrp, int height));
#ifdef FEAT_VERTSPLIT #ifdef FEAT_VERTSPLIT
...@@ -2897,9 +2896,16 @@ current_tabpage() ...@@ -2897,9 +2896,16 @@ current_tabpage()
leave_tabpage(tp) leave_tabpage(tp)
tabpage_T *tp; tabpage_T *tp;
{ {
#if defined(FEAT_GUI)
/* Remove the scrollbars. They may be added back later. */
if (gui.in_use)
gui_remove_scrollbars();
#endif
tp->tp_curwin = curwin; tp->tp_curwin = curwin;
tp->tp_firstwin = firstwin; tp->tp_firstwin = firstwin;
tp->tp_lastwin = lastwin; tp->tp_lastwin = lastwin;
tp->tp_old_Rows = Rows;
tp->tp_old_Columns = Columns;
firstwin = NULL; firstwin = NULL;
lastwin = NULL; lastwin = NULL;
} }
...@@ -2913,6 +2919,8 @@ enter_tabpage(tp, old_curbuf) ...@@ -2913,6 +2919,8 @@ enter_tabpage(tp, old_curbuf)
tabpage_T *tp; tabpage_T *tp;
buf_T *old_curbuf; buf_T *old_curbuf;
{ {
int old_off = tp->tp_firstwin->w_winrow;
firstwin = tp->tp_firstwin; firstwin = tp->tp_firstwin;
lastwin = tp->tp_lastwin; lastwin = tp->tp_lastwin;
topframe = tp->tp_topframe; topframe = tp->tp_topframe;
...@@ -2923,14 +2931,29 @@ enter_tabpage(tp, old_curbuf) ...@@ -2923,14 +2931,29 @@ enter_tabpage(tp, old_curbuf)
apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf); apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
#endif #endif
/* status line may appear or disappear */ last_status(FALSE); /* status line may appear or disappear */
last_status(FALSE); (void)win_comp_pos(); /* recompute w_winrow for all windows */
#if defined(FEAT_GUI) && defined(FEAT_VERTSPLIT) /* The tabpage line may have appeared or disappeared, may need to resize
/* When 'guioptions' includes 'L' or 'R' may have to add or remove * the frames for that. When the Vim window was resized need to update
* scrollbars. */ * frame sizes too. */
if (gui.in_use && !win_hasvertsplit()) if (tp->tp_old_Rows != Rows || old_off != firstwin->w_winrow)
shell_new_rows();
#ifdef FEAT_VERTSPLIT
if (tp->tp_old_Columns != Columns)
shell_new_columns(); /* update window widths */
#endif
#if defined(FEAT_GUI)
/* When 'guioptions' includes 'L' or 'R' may have to remove or add
* scrollbars. Have to update them anyway. */
if (gui.in_use)
{
out_flush();
gui_init_which_components(NULL); gui_init_which_components(NULL);
gui_update_scrollbars(TRUE);
}
need_mouse_correct = TRUE;
#endif #endif
redraw_all_later(CLEAR); redraw_all_later(CLEAR);
...@@ -3683,7 +3706,7 @@ win_size_restore(gap) ...@@ -3683,7 +3706,7 @@ win_size_restore(gap)
* frames. * frames.
* Returns the row just after the last window. * Returns the row just after the last window.
*/ */
static int int
win_comp_pos() win_comp_pos()
{ {
int row = tabpageline_height(); int row = tabpageline_height();
...@@ -4781,14 +4804,16 @@ last_status_rec(fr, statusline) ...@@ -4781,14 +4804,16 @@ last_status_rec(fr, statusline)
} }
/* /*
* Return TRUE if the tab page line is to be drawn. * Return the number of lines used by the tab page line.
*/ */
int int
tabpageline_height() tabpageline_height()
{ {
/* TODO: option to tell when to show the tabs. */ switch (p_tal)
if (first_tabpage->tp_next == NULL) {
return 0; case 0: return 0;
case 1: return (first_tabpage->tp_next == NULL) ? 0 : 1;
}
return 1; return 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment