Mercurial > vim
changeset 8643:24b43dd167eb v7.4.1611
commit https://github.com/vim/vim/commit/44a2f923c00f1384c9ecde12fb5b4711bc20702e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 19 22:11:51 2016 +0100
patch 7.4.1611
Problem: The versplit feature makes the code uneccessary complicated.
Solution: Remove FEAT_VERTSPLIT, always support vertical splits when
FEAT_WINDOWS is defined.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 19 Mar 2016 22:15:06 +0100 |
parents | c7727ca972e3 |
children | 1a10628841db |
files | src/buffer.c src/charset.c src/eval.c src/ex_cmds.c src/ex_docmd.c src/ex_getln.c src/feature.h src/globals.h src/gui.c src/gui.h src/if_lua.c src/if_mzsch.c src/if_py_both.h src/if_ruby.c src/main.c src/misc1.c src/misc2.c src/move.c src/normal.c src/option.c src/option.h src/quickfix.c src/screen.c src/structs.h src/syntax.c src/term.c src/term.h src/ui.c src/version.c src/vim.h src/window.c |
diffstat | 31 files changed, 144 insertions(+), 400 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.c +++ b/src/buffer.c @@ -4607,9 +4607,9 @@ do_arg_all( old_curwin = curwin; old_curtab = curtab; -#ifdef FEAT_GUI +# ifdef FEAT_GUI need_mouse_correct = TRUE; -#endif +# endif /* * Try closing all windows that are not in the argument list. @@ -4629,10 +4629,7 @@ do_arg_all( buf = wp->w_buffer; if (buf->b_ffname == NULL || (!keep_tabs && buf->b_nwindows > 1) -#ifdef FEAT_VERTSPLIT - || wp->w_width != Columns -#endif - ) + || wp->w_width != Columns) i = opened_len; else { @@ -4901,13 +4898,11 @@ ex_buffer_all(exarg_T *eap) { wpnext = wp->w_next; if ((wp->w_buffer->b_nwindows > 1 -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS || ((cmdmod.split & WSP_VERT) ? wp->w_height + wp->w_status_height < Rows - p_ch - tabline_height() : wp->w_width != Columns) -#endif -#ifdef FEAT_WINDOWS || (had_tab > 0 && wp != firstwin) #endif ) && firstwin != lastwin
--- a/src/charset.c +++ b/src/charset.c @@ -1093,7 +1093,7 @@ win_lbr_chartabsize( && vim_isbreak(c) && !vim_isbreak(s[1]) && wp->w_p_wrap -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS && wp->w_width != 0 # endif ) @@ -1250,10 +1250,10 @@ in_win_border(win_T *wp, colnr_T vcol) int width1; /* width of first line (after line number) */ int width2; /* width of further lines */ -#ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS if (wp->w_width == 0) /* there is no border */ return FALSE; -#endif +# endif width1 = W_WIDTH(wp) - win_col_off(wp); if ((int)vcol < width1 - 1) return FALSE;
--- a/src/eval.c +++ b/src/eval.c @@ -13734,7 +13734,7 @@ f_has(typval_T *argvars, typval_T *rettv #ifdef FEAT_VIMINFO "viminfo", #endif -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS "vertsplit", #endif #ifdef FEAT_VIRTUALEDIT @@ -20646,10 +20646,8 @@ f_winrestcmd(typval_T *argvars UNUSED, t { sprintf((char *)buf, "%dresize %d|", winnr, wp->w_height); ga_concat(&ga, buf); -# ifdef FEAT_VERTSPLIT sprintf((char *)buf, "vert %dresize %d|", winnr, wp->w_width); ga_concat(&ga, buf); -# endif ++winnr; } ga_append(&ga, NUL); @@ -20701,7 +20699,7 @@ f_winrestview(typval_T *argvars, typval_ check_cursor(); win_new_height(curwin, curwin->w_height); -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS win_new_width(curwin, W_WIDTH(curwin)); # endif changed_window_setting(); @@ -20756,7 +20754,7 @@ f_winwidth(typval_T *argvars, typval_T * if (wp == NULL) rettv->vval.v_number = -1; else -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS rettv->vval.v_number = wp->w_width; #else rettv->vval.v_number = Columns;
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5867,11 +5867,9 @@ ex_help(exarg_T *eap) * specified, the current window is vertically split and * narrow. */ n = WSP_HELP; -# ifdef FEAT_VERTSPLIT if (cmdmod.split == 0 && curwin->w_width != Columns && curwin->w_width < 80) n |= WSP_TOP; -# endif if (win_split(0, n) == FAIL) goto erret; #else
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2013,7 +2013,7 @@ do_one_cmd( case 'v': if (checkforcmd(&ea.cmd, "vertical", 4)) { -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS cmdmod.split |= WSP_VERT; #endif continue; @@ -7923,14 +7923,6 @@ ex_splitview(exarg_T *eap) int browse_flag = cmdmod.browse; # endif -# ifndef FEAT_VERTSPLIT - if (eap->cmdidx == CMD_vsplit || eap->cmdidx == CMD_vnew) - { - ex_ni(eap); - return; - } -# endif - # ifdef FEAT_GUI need_mouse_correct = TRUE; # endif @@ -7942,10 +7934,8 @@ ex_splitview(exarg_T *eap) { if (eap->cmdidx == CMD_split) eap->cmdidx = CMD_new; -# ifdef FEAT_VERTSPLIT if (eap->cmdidx == CMD_vsplit) eap->cmdidx = CMD_vnew; -# endif } # endif @@ -7964,9 +7954,7 @@ ex_splitview(exarg_T *eap) # endif # ifdef FEAT_BROWSE if (cmdmod.browse -# ifdef FEAT_VERTSPLIT && eap->cmdidx != CMD_vnew -# endif && eap->cmdidx != CMD_new) { # ifdef FEAT_AUTOCMD @@ -8224,11 +8212,10 @@ ex_resize(exarg_T *eap) ; } -#ifdef FEAT_GUI +# ifdef FEAT_GUI need_mouse_correct = TRUE; -#endif +# endif n = atol((char *)eap->arg); -#ifdef FEAT_VERTSPLIT if (cmdmod.split & WSP_VERT) { if (*eap->arg == '-' || *eap->arg == '+') @@ -8238,7 +8225,6 @@ ex_resize(exarg_T *eap) win_setwidth_win((int)n, wp); } else -#endif { if (*eap->arg == '-' || *eap->arg == '+') n += curwin->w_height; @@ -8397,7 +8383,7 @@ do_exedit( if ((eap->cmdidx == CMD_new || eap->cmdidx == CMD_tabnew || eap->cmdidx == CMD_tabedit -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS || eap->cmdidx == CMD_vnew #endif ) && *eap->arg == NUL) @@ -8409,7 +8395,7 @@ do_exedit( old_curwin == NULL ? curwin : NULL); } else if ((eap->cmdidx != CMD_split -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && eap->cmdidx != CMD_vsplit #endif )
--- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -500,11 +500,7 @@ getcmdline( } else { -# ifdef FEAT_VERTSPLIT win_redraw_last_status(topframe); -# else - lastwin->w_redr_status = TRUE; -# endif redraw_statuslines(); } KeyTyped = skt;
--- a/src/feature.h +++ b/src/feature.h @@ -97,6 +97,7 @@ /* * +windows Multiple windows. Without this there is no help * window and no status lines. + * +vertsplit Vertically split windows. */ #ifdef FEAT_SMALL # define FEAT_WINDOWS @@ -112,16 +113,6 @@ #endif /* - * +vertsplit Vertically split windows. - */ -#ifdef FEAT_NORMAL -# define FEAT_VERTSPLIT -#endif -#if defined(FEAT_VERTSPLIT) && !defined(FEAT_WINDOWS) -# define FEAT_WINDOWS -#endif - -/* * +cmdhist Command line history. */ #ifdef FEAT_SMALL @@ -144,8 +135,8 @@ # define FEAT_JUMPLIST #endif -/* the cmdline-window requires FEAT_VERTSPLIT and FEAT_CMDHIST */ -#if defined(FEAT_VERTSPLIT) && defined(FEAT_CMDHIST) +/* the cmdline-window requires FEAT_WINDOWS and FEAT_CMDHIST */ +#if defined(FEAT_WINDOWS) && defined(FEAT_CMDHIST) # define FEAT_CMDWIN #endif @@ -601,7 +592,7 @@ * +mksession ":mksession" command. * Requires +windows and +vertsplit. */ -#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) && defined(FEAT_VERTSPLIT) +#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) # define FEAT_SESSION #endif
--- a/src/globals.h +++ b/src/globals.h @@ -427,7 +427,7 @@ EXTERN int gui_prev_topfill INIT(= 0); EXTERN int drag_status_line INIT(= FALSE); /* dragging the status line */ EXTERN int postponed_mouseshape INIT(= FALSE); /* postponed updating the mouse pointer shape */ -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS EXTERN int drag_sep_line INIT(= FALSE); /* dragging vert separator */ # endif # endif @@ -1547,9 +1547,7 @@ EXTERN char_u e_umark[] INIT(= N_("E78: EXTERN char_u e_wildexpand[] INIT(= N_("E79: Cannot expand wildcards")); #ifdef FEAT_WINDOWS EXTERN char_u e_winheight[] INIT(= N_("E591: 'winheight' cannot be smaller than 'winminheight'")); -# ifdef FEAT_VERTSPLIT EXTERN char_u e_winwidth[] INIT(= N_("E592: 'winwidth' cannot be smaller than 'winminwidth'")); -# endif #endif EXTERN char_u e_write[] INIT(= N_("E80: Error while writing")); EXTERN char_u e_zerocount[] INIT(= N_("Zero count"));
--- a/src/gui.c +++ b/src/gui.c @@ -1812,7 +1812,7 @@ gui_write( gui.scroll_region_bot = arg1; } break; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS case 'V': /* Set vertical scroll region */ if (arg1 < arg2) { @@ -3128,7 +3128,7 @@ button_set: && button != MOUSE_DRAG # ifdef FEAT_MOUSESHAPE && !drag_status_line -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS && !drag_sep_line # endif # endif @@ -3406,7 +3406,7 @@ gui_init_which_components(char_u *oldval case GO_RIGHT: gui.which_scrollbars[SBAR_RIGHT] = TRUE; break; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS case GO_VLEFT: if (win_hasvertsplit()) gui.which_scrollbars[SBAR_LEFT] = TRUE; @@ -3839,7 +3839,7 @@ gui_create_scrollbar(scrollbar_T *sb, in sb->max = 1; sb->top = 0; sb->height = 0; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS sb->width = 0; #endif sb->status_height = 0; @@ -4121,7 +4121,7 @@ gui_update_scrollbars( long val, size, max; /* need 32 bits here */ int which_sb; int h, y; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS static win_T *prev_curwin = NULL; #endif @@ -4219,10 +4219,8 @@ gui_update_scrollbars( #ifdef FEAT_WINDOWS || sb->top != wp->w_winrow || sb->status_height != wp->w_status_height -# ifdef FEAT_VERTSPLIT || sb->width != wp->w_width || prev_curwin != curwin -# endif #endif ) { @@ -4232,9 +4230,7 @@ gui_update_scrollbars( #ifdef FEAT_WINDOWS sb->top = wp->w_winrow; sb->status_height = wp->w_status_height; -# ifdef FEAT_VERTSPLIT sb->width = wp->w_width; -# endif #endif /* Calculate height and position in pixels */ @@ -4316,7 +4312,7 @@ gui_update_scrollbars( val, size, max); } } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS prev_curwin = curwin; #endif --hold_gui_events; @@ -4333,7 +4329,7 @@ gui_do_scrollbar( int which, /* SBAR_LEFT or SBAR_RIGHT */ int enable) /* TRUE to enable scrollbar */ { -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS int midcol = curwin->w_wincol + curwin->w_width / 2; int has_midcol = (wp->w_wincol <= midcol && wp->w_wincol + wp->w_width >= midcol); @@ -4857,7 +4853,7 @@ gui_mouse_moved(int x, int y) st[2] = KE_FILLER; st[3] = (char_u)MOUSE_LEFT; fill_mouse_coord(st + 4, -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS wp->w_wincol == 0 ? -1 : wp->w_wincol + MOUSE_COLOFF, #else -1, @@ -4934,11 +4930,9 @@ xy2win(int x UNUSED, int y UNUSED) } else if (row > wp->w_height) /* below status line */ update_mouseshape(SHAPE_IDX_CLINE); -# ifdef FEAT_VERTSPLIT else if (!(State & CMDLINE) && W_VSEP_WIDTH(wp) > 0 && col == wp->w_width && (row != wp->w_height || !stl_connected(wp)) && msg_scrolled == 0) update_mouseshape(SHAPE_IDX_VSEP); -# endif else if (!(State & CMDLINE) && W_STATUS_HEIGHT(wp) > 0 && row == wp->w_height && msg_scrolled == 0) update_mouseshape(SHAPE_IDX_STATUS);
--- a/src/gui.h +++ b/src/gui.h @@ -179,7 +179,7 @@ typedef struct GuiScrollbar /* Values measured in characters: */ int top; /* Top of scroll bar (chars from row 0) */ int height; /* Current height of scroll bar in rows */ -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS int width; /* Current width of scroll bar in cols */ #endif int status_height; /* Height of status line */
--- a/src/if_lua.c +++ b/src/if_lua.c @@ -1177,7 +1177,7 @@ luaV_window_index(lua_State *L) lua_pushinteger(L, w->w_cursor.lnum); else if (strncmp(s, "col", 3) == 0) lua_pushinteger(L, w->w_cursor.col + 1); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS else if (strncmp(s, "width", 5) == 0) lua_pushinteger(L, W_WIDTH(w)); #endif @@ -1220,7 +1220,7 @@ luaV_window_newindex (lua_State *L) w->w_cursor.col = v - 1; update_screen(VALID); } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS else if (strncmp(s, "width", 5) == 0) { win_T *win = curwin;
--- a/src/if_mzsch.c +++ b/src/if_mzsch.c @@ -145,7 +145,7 @@ static Scheme_Object *get_window_num(voi static Scheme_Object *get_window_buffer(void *, int, Scheme_Object **); static Scheme_Object *get_window_height(void *, int, Scheme_Object **); static Scheme_Object *set_window_height(void *, int, Scheme_Object **); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS static Scheme_Object *get_window_width(void *, int, Scheme_Object **); static Scheme_Object *set_window_width(void *, int, Scheme_Object **); #endif @@ -2066,7 +2066,7 @@ set_window_height(void *data, int argc, return scheme_void; } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* (get-win-width [window]) */ static Scheme_Object * get_window_width(void *data, int argc, Scheme_Object **argv) @@ -3718,7 +3718,7 @@ static Vim_Prim prims[]= {get_window_buffer, "get-win-buffer", 0, 1}, {get_window_height, "get-win-height", 0, 1}, {set_window_height, "set-win-height", 1, 2}, -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS {get_window_width, "get-win-width", 0, 1}, {set_window_width, "set-win-width", 1, 2}, #endif
--- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -3673,8 +3673,6 @@ WindowAttr(WindowObject *self, char *nam #ifdef FEAT_WINDOWS else if (strcmp(name, "row") == 0) return PyLong_FromLong((long)(self->win->w_winrow)); -#endif -#ifdef FEAT_VERTSPLIT else if (strcmp(name, "width") == 0) return PyLong_FromLong((long)(W_WIDTH(self->win))); else if (strcmp(name, "col") == 0) @@ -3765,7 +3763,7 @@ WindowSetattr(WindowObject *self, char * return 0; } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS else if (strcmp(name, "width") == 0) { long width;
--- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -1449,7 +1449,7 @@ static VALUE window_width(VALUE self UNU static VALUE window_set_width(VALUE self UNUSED, VALUE width) { -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS win_T *win = get_win(self); win_T *savewin = curwin;
--- a/src/main.c +++ b/src/main.c @@ -2088,7 +2088,7 @@ command_line_scan(mparm_T *parmp) break; case 'O': /* "-O[N]" open N vertical split windows */ -#if defined(FEAT_VERTSPLIT) && defined(FEAT_WINDOWS) +#ifdef FEAT_WINDOWS /* default is 0: open window for each file */ parmp->window_count = get_number_arg((char_u *)argv[0], &argv_idx, 0);
--- a/src/misc1.c +++ b/src/misc1.c @@ -1976,7 +1976,7 @@ plines_win_nofill( if (!wp->w_p_wrap) return 1; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (wp->w_width == 0) return 1; #endif @@ -2052,7 +2052,7 @@ plines_win_col(win_T *wp, linenr_T lnum, if (!wp->w_p_wrap) return lines + 1; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (wp->w_width == 0) return lines + 1; #endif
--- a/src/misc2.c +++ b/src/misc2.c @@ -169,7 +169,7 @@ coladvance2( if (finetune && curwin->w_p_wrap -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS && curwin->w_width != 0 # endif && wcol >= (colnr_T)width) @@ -3633,7 +3633,7 @@ get_shape_idx(int mouse) } if (mouse && drag_status_line) return SHAPE_IDX_SDRAG; -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS if (mouse && drag_sep_line) return SHAPE_IDX_VDRAG; # endif
--- a/src/move.c +++ b/src/move.c @@ -990,7 +990,7 @@ curs_columns( curwin->w_wrow = curwin->w_height - 1; } else if (curwin->w_p_wrap -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && curwin->w_width != 0 #endif ) @@ -1096,7 +1096,7 @@ curs_columns( && curwin->w_height != 0 && curwin->w_cursor.lnum == curwin->w_topline && width > 0 -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && curwin->w_width != 0 #endif ) @@ -1259,7 +1259,7 @@ scrolldown( */ wrow = curwin->w_wrow; if (curwin->w_p_wrap -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && curwin->w_width != 0 #endif ) @@ -1468,7 +1468,7 @@ scrolldown_clamp(void) end_row += plines(curwin->w_topline - 1); #endif if (curwin->w_p_wrap -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && curwin->w_width != 0 #endif ) @@ -1532,7 +1532,7 @@ scrollup_clamp(void) start_row = curwin->w_wrow - plines(curwin->w_topline); #endif if (curwin->w_p_wrap -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && curwin->w_width != 0 #endif )
--- a/src/normal.c +++ b/src/normal.c @@ -2306,8 +2306,6 @@ do_mouse( int in_status_line; /* mouse in status line */ #ifdef FEAT_WINDOWS static int in_tab_line = FALSE; /* mouse clicked in tab line */ -#endif -#ifdef FEAT_VERTSPLIT int in_sep_line; /* mouse in vertical separator line */ #endif int c1, c2; @@ -2384,13 +2382,11 @@ do_mouse( drag_status_line = FALSE; update_mouseshape(SHAPE_IDX_STATUS); } -# ifdef FEAT_VERTSPLIT if (!is_drag && drag_sep_line) { drag_sep_line = FALSE; update_mouseshape(SHAPE_IDX_VSEP); } -# endif #endif /* @@ -2784,9 +2780,7 @@ do_mouse( oap == NULL ? NULL : &(oap->inclusive), which_button); moved = (jump_flags & CURSOR_MOVED); in_status_line = (jump_flags & IN_STATUS_LINE); -#ifdef FEAT_VERTSPLIT in_sep_line = (jump_flags & IN_SEP_LINE); -#endif #ifdef FEAT_NETBEANS_INTG if (isNetbeansBuffer(curbuf) @@ -3022,7 +3016,6 @@ do_mouse( } #endif } -#ifdef FEAT_VERTSPLIT else if (in_sep_line) { # ifdef FEAT_MOUSESHAPE @@ -3033,7 +3026,6 @@ do_mouse( } # endif } -#endif else if ((mod_mask & MOD_MASK_MULTI_CLICK) && (State & (NORMAL | INSERT)) && mouse_has(MOUSE_VISUAL)) { @@ -4401,10 +4393,10 @@ nv_screengo(oparg_T *oap, int dir, long if (width2 == 0) width2 = 1; /* avoid divide by zero */ -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (curwin->w_width != 0) - { -#endif +#endif + { /* * Instead of sticking at the last character of the buffer line we * try to stick in the last column of the screen. @@ -4491,9 +4483,7 @@ nv_screengo(oparg_T *oap, int dir, long } } } -#ifdef FEAT_VERTSPLIT - } -#endif + } if (virtual_active() && atend) coladvance(MAXCOL); @@ -7987,7 +7977,7 @@ nv_g_cmd(cmdarg_T *cap) oap->motion_type = MCHAR; oap->inclusive = FALSE; if (curwin->w_p_wrap -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && curwin->w_width != 0 #endif ) @@ -8054,7 +8044,7 @@ nv_g_cmd(cmdarg_T *cap) oap->motion_type = MCHAR; oap->inclusive = TRUE; if (curwin->w_p_wrap -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && curwin->w_width != 0 #endif )
--- a/src/option.c +++ b/src/option.c @@ -243,8 +243,6 @@ #define PV_UL OPT_BOTH(OPT_BUF(BV_UL)) #ifdef FEAT_WINDOWS # define PV_WFH OPT_WIN(WV_WFH) -#endif -#ifdef FEAT_VERTSPLIT # define PV_WFW OPT_WIN(WV_WFW) #endif #define PV_WRAP OPT_WIN(WV_WRAP) @@ -466,10 +464,9 @@ struct vimoption # define ISP_LATIN1 (char_u *)"@,161-255" #endif -/* The 16 bit MS-DOS version is low on space, make the string as short as - * possible when compiling with few features. */ +/* Make the string as short as possible when compiling with few features. */ #if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \ - || defined(FEAT_VERTSPLIT) || defined(FEAT_CLIPBOARD) \ + || defined(FEAT_WINDOWS) || defined(FEAT_CLIPBOARD) \ || defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) || defined(FEAT_CONCEAL) # define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn" #else @@ -1040,7 +1037,7 @@ static struct vimoption options[] = (char_u *)&p_dy, PV_NONE, {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, {"eadirection", "ead", P_STRING|P_VI_DEF, -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS (char_u *)&p_ead, PV_NONE, {(char_u *)"both", (char_u *)0L} #else @@ -2492,7 +2489,7 @@ static struct vimoption options[] = #endif {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, {"splitright", "spr", P_BOOL|P_VI_DEF, -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS (char_u *)&p_spr, PV_NONE, #else (char_u *)NULL, PV_NONE, @@ -2892,7 +2889,7 @@ static struct vimoption options[] = #endif {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT, -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS (char_u *)VAR_WIN, PV_WFW, #else (char_u *)NULL, PV_NONE, @@ -2906,14 +2903,14 @@ static struct vimoption options[] = #endif {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, {"winminwidth", "wmw", P_NUM|P_VI_DEF, -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS (char_u *)&p_wmw, PV_NONE, #else (char_u *)NULL, PV_NONE, #endif {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, {"winwidth", "wiw", P_NUM|P_VI_DEF, -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS (char_u *)&p_wiw, PV_NONE, #else (char_u *)NULL, PV_NONE, @@ -2966,7 +2963,7 @@ static struct vimoption options[] = p_term("t_CS", T_CCS) p_term("t_Cs", T_UCS) p_term("t_cs", T_CS) -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS p_term("t_CV", T_CSV) #endif p_term("t_da", T_DA) @@ -3049,7 +3046,7 @@ static char *(p_bsdir_values[]) = {"curr static char *(p_scbopt_values[]) = {"ver", "hor", "jump", NULL}; #endif static char *(p_debug_values[]) = {"msg", "throw", "beep", NULL}; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS static char *(p_ead_values[]) = {"both", "ver", "hor", NULL}; #endif #if defined(FEAT_QUICKFIX) @@ -6796,7 +6793,7 @@ did_set_string_option( } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* 'eadirection' */ else if (varp == &p_ead) { @@ -8468,7 +8465,7 @@ set_num_option( win_setminheight(); } -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS else if (pp == &p_wiw) { if (p_wiw < 1) @@ -10259,8 +10256,6 @@ get_varp(struct vimoption *p) #endif #ifdef FEAT_WINDOWS case PV_WFH: return (char_u *)&(curwin->w_p_wfh); -#endif -#ifdef FEAT_VERTSPLIT case PV_WFW: return (char_u *)&(curwin->w_p_wfw); #endif #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
--- a/src/option.h +++ b/src/option.h @@ -463,7 +463,7 @@ static char *(p_dy_values[]) = {"lastlin #define DY_LASTLINE 0x001 #define DY_UHEX 0x002 EXTERN int p_ed; /* 'edcompatible' */ -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS EXTERN char_u *p_ead; /* 'eadirection' */ #endif EXTERN int p_ea; /* 'equalalways' */ @@ -802,7 +802,7 @@ EXTERN char_u *p_tal; /* 'tabline' */ #ifdef FEAT_SPELL EXTERN char_u *p_sps; /* 'spellsuggest' */ #endif -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS EXTERN int p_spr; /* 'splitright' */ #endif EXTERN int p_sol; /* 'startofline' */ @@ -957,8 +957,6 @@ EXTERN int p_wmnu; /* 'wildmenu' */ #ifdef FEAT_WINDOWS EXTERN long p_wh; /* 'winheight' */ EXTERN long p_wmh; /* 'winminheight' */ -#endif -#ifdef FEAT_VERTSPLIT EXTERN long p_wmw; /* 'winminwidth' */ EXTERN long p_wiw; /* 'winwidth' */ #endif @@ -1172,8 +1170,6 @@ enum #endif #ifdef FEAT_WINDOWS , WV_WFH -#endif -#ifdef FEAT_VERTSPLIT , WV_WFW #endif , WV_WRAP
--- a/src/quickfix.c +++ b/src/quickfix.c @@ -1578,11 +1578,9 @@ qf_jump( * specified, the current window is vertically split and narrow. */ flags = WSP_HELP; -# ifdef FEAT_VERTSPLIT if (cmdmod.split == 0 && curwin->w_width != Columns && curwin->w_width < 80) flags |= WSP_TOP; -# endif if (qi != &ql_info) flags |= WSP_NEWLOC; /* don't copy the location list */ @@ -2360,15 +2358,12 @@ ex_copen(exarg_T *eap) win_goto(win); if (eap->addr_count != 0) { -#ifdef FEAT_VERTSPLIT if (cmdmod.split & WSP_VERT) { if (height != W_WIDTH(win)) win_setwidth(height); } - else -#endif - if (height != win->w_height) + else if (height != win->w_height) win_setheight(height); } } @@ -2425,11 +2420,7 @@ ex_copen(exarg_T *eap) /* Only set the height when still in the same tab page and there is no * window to the side. */ - if (curtab == prevtab -#ifdef FEAT_VERTSPLIT - && curwin->w_width == Columns -#endif - ) + if (curtab == prevtab && curwin->w_width == Columns) win_setheight(height); curwin->w_p_wfh = TRUE; /* set 'winfixheight' */ if (win_valid(win))
--- a/src/screen.c +++ b/src/screen.c @@ -133,7 +133,7 @@ static void screen_line(int row, int col static void screen_line(int row, int coloff, int endcol, int clear_width); # define SCREEN_LINE(r, o, e, c, rl) screen_line((r), (o), (e), (c)) #endif -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS static void draw_vsep_win(win_T *wp, int row); #endif #ifdef FEAT_STL_OPT @@ -156,7 +156,7 @@ static void screen_char_2(unsigned off, static void screenclear2(void); static void lineclear(unsigned off, int width); static void lineinvalid(unsigned off, int width); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS static void linecopy(int to, int from, win_T *wp); static void redraw_block(int row, int end, win_T *wp); #endif @@ -170,7 +170,7 @@ static void draw_tabline(void); #if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) static int fillchar_status(int *attr, int is_curwin); #endif -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS static int fillchar_vsep(int *attr); #endif #ifdef FEAT_STL_OPT @@ -180,7 +180,7 @@ static void win_redr_custom(win_T *wp, i static void win_redr_ruler(win_T *wp, int always); #endif -#if defined(FEAT_CLIPBOARD) || defined(FEAT_VERTSPLIT) +#if defined(FEAT_CLIPBOARD) || defined(FEAT_WINDOWS) /* Ugly global: overrule attribute used by screen_char() */ static int screen_char_attr = 0; #endif @@ -1095,7 +1095,7 @@ win_update(win_T *wp) return; } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* Window is zero-width: Only need to draw the separator. */ if (wp->w_width == 0) { @@ -2138,7 +2138,7 @@ win_update(win_T *wp) } else { -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS draw_vsep_win(wp, row); #endif if (eof) /* we hit the end of the file */ @@ -5627,7 +5627,7 @@ win_line( ) { win_draw_end(wp, '@', ' ', row, wp->w_height, HLF_AT); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS draw_vsep_win(wp, row); #endif row = endrow; @@ -5835,7 +5835,7 @@ screen_line( unsigned max_off_to; #endif int col = 0; -#if defined(FEAT_GUI) || defined(UNIX) || defined(FEAT_VERTSPLIT) +#if defined(FEAT_GUI) || defined(UNIX) || defined(FEAT_WINDOWS) int hl; #endif int force = FALSE; /* force update rest of the line */ @@ -6174,7 +6174,7 @@ screen_line( #endif screen_fill(row, row + 1, col + coloff, clear_width + coloff, ' ', ' ', 0); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS off_to += clear_width - col; col = clear_width; #endif @@ -6183,7 +6183,7 @@ screen_line( if (clear_width > 0) { -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* For a window that's left of another, draw the separator char. */ if (col + coloff < Columns) { @@ -6289,7 +6289,7 @@ redraw_statuslines(void) } #endif -#if (defined(FEAT_WILDMENU) && defined(FEAT_VERTSPLIT)) || defined(PROTO) +#if (defined(FEAT_WILDMENU) && defined(FEAT_WINDOWS)) || defined(PROTO) /* * Redraw all status lines at the bottom of frame "frp". */ @@ -6313,7 +6313,7 @@ win_redraw_last_status(frame_T *frp) } #endif -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* * Draw the verticap separator right of window "wp" starting with line "row". */ @@ -6606,7 +6606,7 @@ win_redr_status_matches( screen_fill(row, row + 1, clen, (int)Columns, fillchar, fillchar, attr); } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS win_redraw_last_status(topframe); #else lastwin->w_redr_status = TRUE; @@ -6700,11 +6700,6 @@ win_redr_status(win_T *wp) len += 4; } -#ifndef FEAT_VERTSPLIT - this_ru_col = ru_col; - if (this_ru_col < (Columns + 1) / 2) - this_ru_col = (Columns + 1) / 2; -#else this_ru_col = ru_col - (Columns - W_WIDTH(wp)); if (this_ru_col < (W_WIDTH(wp) + 1) / 2) this_ru_col = (W_WIDTH(wp) + 1) / 2; @@ -6714,7 +6709,6 @@ win_redr_status(win_T *wp) len = 1; } else -#endif #ifdef FEAT_MBYTE if (has_mbyte) { @@ -6761,7 +6755,6 @@ win_redr_status(win_T *wp) #endif } -#ifdef FEAT_VERTSPLIT /* * May need to draw the character below the vertical separator. */ @@ -6774,7 +6767,6 @@ win_redr_status(win_T *wp) screen_putchar(fillchar, W_WINROW(wp) + wp->w_height, W_ENDCOL(wp), attr); } -#endif busy = FALSE; } @@ -6811,7 +6803,6 @@ redraw_custom_statusline(win_T *wp) } #endif -# ifdef FEAT_VERTSPLIT /* * Return TRUE if the status line of window "wp" is connected to the status * line of the window right of it. If not, then it's a vertical separator. @@ -6839,7 +6830,6 @@ stl_connected(win_T *wp) } return FALSE; } -# endif #endif /* FEAT_WINDOWS */ @@ -6963,7 +6953,7 @@ win_redr_custom( if (*stl++ != '(') stl = p_ruf; } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS col = ru_col - (Columns - W_WIDTH(wp)); if (col < (W_WIDTH(wp) + 1) / 2) col = (W_WIDTH(wp) + 1) / 2; @@ -6999,7 +6989,7 @@ win_redr_custom( # endif } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS col += W_WINCOL(wp); #endif } @@ -8038,7 +8028,7 @@ screen_char(unsigned off, int row, int c /* * Stop highlighting first, so it's easier to move the cursor. */ -#if defined(FEAT_CLIPBOARD) || defined(FEAT_VERTSPLIT) +#if defined(FEAT_CLIPBOARD) || defined(FEAT_WINDOWS) if (screen_char_attr != 0) attr = screen_char_attr; else @@ -8113,7 +8103,7 @@ screen_char_2(unsigned off, int row, int } #endif -#if defined(FEAT_CLIPBOARD) || defined(FEAT_VERTSPLIT) || defined(PROTO) +#if defined(FEAT_CLIPBOARD) || defined(FEAT_WINDOWS) || defined(PROTO) /* * Draw a rectangle of the screen, inverted when "invert" is TRUE. * This uses the contents of ScreenLines[] and doesn't change it. @@ -8167,7 +8157,7 @@ screen_draw_rectangle( } #endif -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* * Redraw the characters for a vertically split window. */ @@ -8875,7 +8865,7 @@ lineinvalid(unsigned off, int width) (void)vim_memset(ScreenAttrs + off, -1, (size_t)width * sizeof(sattr_T)); } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* * Copy part of a Screenline for vertically split window "wp". */ @@ -9373,7 +9363,7 @@ win_do_lines( /* only a few lines left: redraw is faster */ if (mayclear && Rows - line_count < 5 -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && wp->w_width == Columns #endif ) @@ -9409,12 +9399,12 @@ win_do_lines( * scroll-up . */ if (scroll_region -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS || W_WIDTH(wp) != Columns #endif ) { -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (scroll_region && (wp->w_width == Columns || *T_CSV != NUL)) #endif scroll_region_set(wp, row); @@ -9424,7 +9414,7 @@ win_do_lines( else retval = screen_ins_lines(W_WINROW(wp) + row, 0, line_count, wp->w_height - row, wp); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (scroll_region && (wp->w_width == Columns || *T_CSV != NUL)) #endif scroll_region_reset(); @@ -9543,7 +9533,7 @@ screen_ins_lines( * exists. */ result_empty = (row + line_count >= end); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (wp != NULL && wp->w_width != Columns && *T_CSV == NUL) type = USE_REDRAW; else @@ -9585,7 +9575,7 @@ screen_ins_lines( /* Remove a modeless selection when inserting lines halfway the screen * or not the full width of the screen. */ if (off + row > 0 -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS || (wp != NULL && wp->w_width != Columns) # endif ) @@ -9613,7 +9603,7 @@ screen_ins_lines( end += off; for (i = 0; i < line_count; ++i) { -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (wp != NULL && wp->w_width != Columns) { /* need to copy part of a line */ @@ -9649,7 +9639,7 @@ screen_ins_lines( screen_stop_highlight(); windgoto(cursor_row, 0); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* redraw the characters */ if (type == USE_REDRAW) redraw_block(row, end, wp); @@ -9758,7 +9748,7 @@ screen_del_lines( * 5. Use T_DL (delete line) if it exists. * 6. redraw the characters from ScreenLines[]. */ -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (wp != NULL && wp->w_width != Columns && *T_CSV == NUL) type = USE_REDRAW; else @@ -9790,7 +9780,7 @@ screen_del_lines( else if (*T_CDL != NUL && line_count > 1 && can_delete) type = USE_T_CDL; else if (can_clear(T_CE) && result_empty -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && (wp == NULL || wp->w_width == Columns) #endif ) @@ -9806,7 +9796,7 @@ screen_del_lines( /* Remove a modeless selection when deleting lines halfway the screen or * not the full width of the screen. */ if (off + row > 0 -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS || (wp != NULL && wp->w_width != Columns) # endif ) @@ -9840,7 +9830,7 @@ screen_del_lines( end += off; for (i = 0; i < line_count; ++i) { -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (wp != NULL && wp->w_width != Columns) { /* need to copy part of a line */ @@ -9876,7 +9866,7 @@ screen_del_lines( screen_stop_highlight(); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* redraw the characters */ if (type == USE_REDRAW) redraw_block(row, end, wp); @@ -10445,7 +10435,7 @@ fillchar_status(int *attr, int is_curwin } #endif -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* * Get the character to use in a separator between vertically split windows. * Get its attributes in "*attr". @@ -10540,7 +10530,7 @@ win_redr_ruler(win_T *wp, int always) int i; size_t len; int o; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS int this_ru_col; int off = 0; int width = Columns; @@ -10623,10 +10613,8 @@ win_redr_ruler(win_T *wp, int always) { row = W_WINROW(wp) + wp->w_height; fillchar = fillchar_status(&attr, wp == curwin); -# ifdef FEAT_VERTSPLIT off = W_WINCOL(wp); width = W_WIDTH(wp); -# endif } else #endif @@ -10634,7 +10622,7 @@ win_redr_ruler(win_T *wp, int always) row = Rows - 1; fillchar = ' '; attr = 0; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS width = Columns; off = 0; #endif @@ -10674,7 +10662,7 @@ win_redr_ruler(win_T *wp, int always) if (wp->w_status_height == 0) /* can't use last char of screen */ #endif ++o; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS this_ru_col = ru_col - (Columns - width); if (this_ru_col < 0) this_ru_col = 0;
--- a/src/structs.h +++ b/src/structs.h @@ -2200,7 +2200,7 @@ typedef struct w_line struct frame_S { char fr_layout; /* FR_LEAF, FR_COL or FR_ROW */ -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS int fr_width; int fr_newwidth; /* new width used in win_equal_rec() */ #endif @@ -2370,8 +2370,6 @@ struct window_S status/command line(s) */ #ifdef FEAT_WINDOWS int w_status_height; /* number of status lines (0 or 1) */ -#endif -#ifdef FEAT_VERTSPLIT int w_wincol; /* Leftmost column of window in screen. use W_WINCOL() */ int w_width; /* Width of window, excluding separation.
--- a/src/syntax.c +++ b/src/syntax.c @@ -6783,7 +6783,7 @@ static char *(highlight_init_both[]) = "StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold"), CENT("StatusLineNC term=reverse cterm=reverse", "StatusLineNC term=reverse cterm=reverse gui=reverse"), -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS CENT("VertSplit term=reverse cterm=reverse", "VertSplit term=reverse cterm=reverse gui=reverse"), #endif
--- a/src/term.c +++ b/src/term.c @@ -179,13 +179,13 @@ static struct builtin_term builtin_termc # ifdef TERMINFO {(int)KS_CDL, IF_EB("\033|%p1%dD", ESC_STR "|%p1%dD")}, {(int)KS_CS, IF_EB("\033|%p1%d;%p2%dR", ESC_STR "|%p1%d;%p2%dR")}, -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS {(int)KS_CSV, IF_EB("\033|%p1%d;%p2%dV", ESC_STR "|%p1%d;%p2%dV")}, # endif # else {(int)KS_CDL, IF_EB("\033|%dD", ESC_STR "|%dD")}, {(int)KS_CS, IF_EB("\033|%d;%dR", ESC_STR "|%d;%dR")}, -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS {(int)KS_CSV, IF_EB("\033|%d;%dV", ESC_STR "|%d;%dV")}, # endif # endif @@ -1080,7 +1080,7 @@ static struct builtin_term builtin_termc # else {(int)KS_CS, "[%dCS%d]"}, # endif -# ifdef FEAT_VERTSPLIT +# ifdef FEAT_WINDOWS # ifdef TERMINFO {(int)KS_CSV, "[%p1%dCSV%p2%d]"}, # else @@ -2862,7 +2862,7 @@ win_new_shellsize(void) if (old_Columns != Columns) { old_Columns = Columns; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS shell_new_columns(); /* update window sizes */ #endif } @@ -3485,7 +3485,7 @@ scroll_region_set(win_T *wp, int off) { OUT_STR(tgoto((char *)T_CS, W_WINROW(wp) + wp->w_height - 1, W_WINROW(wp) + off)); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (*T_CSV != NUL && wp->w_width != Columns) OUT_STR(tgoto((char *)T_CSV, W_WINCOL(wp) + wp->w_width - 1, W_WINCOL(wp))); @@ -3500,7 +3500,7 @@ scroll_region_set(win_T *wp, int off) scroll_region_reset(void) { OUT_STR(tgoto((char *)T_CS, (int)Rows - 1, 0)); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (*T_CSV != NUL) OUT_STR(tgoto((char *)T_CSV, (int)Columns - 1, 0)); #endif
--- a/src/term.h +++ b/src/term.h @@ -83,7 +83,7 @@ enum SpecialKey KS_CSI, /* start insert mode (bar cursor) */ KS_CEI, /* end insert mode (block cursor) */ KS_CSR, /* start replace mode (underline cursor) */ -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS KS_CSV, /* scroll region vertical */ #endif KS_OP, /* original color pair */
--- a/src/ui.c +++ b/src/ui.c @@ -2583,7 +2583,7 @@ jump_to_mouse( int which_button) /* MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE */ { static int on_status_line = 0; /* #lines below bottom of window */ -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS static int on_sep_line = 0; /* on separator right of window */ #endif static int prev_row = -1; @@ -2623,7 +2623,7 @@ retnomove: * line, stop Visual mode */ if (on_status_line) return IN_STATUS_LINE; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (on_sep_line) return IN_SEP_LINE; #endif @@ -2681,7 +2681,7 @@ retnomove: } else on_status_line = 0; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (col >= wp->w_width) /* In separator line */ { on_sep_line = col - wp->w_width + 1; @@ -2706,7 +2706,7 @@ retnomove: if (VIsual_active && (wp->w_buffer != curwin->w_buffer || (!on_status_line -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS && !on_sep_line #endif #ifdef FEAT_FOLDING @@ -2730,9 +2730,7 @@ retnomove: { /* A click outside the command-line window: Use modeless * selection if possible. Allow dragging the status lines. */ -# ifdef FEAT_VERTSPLIT on_sep_line = 0; -# endif # ifdef FEAT_CLIPBOARD if (on_status_line) return IN_STATUS_LINE; @@ -2764,7 +2762,7 @@ retnomove: else return IN_STATUS_LINE | CURSOR_MOVED; } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (on_sep_line) /* In (or below) status line */ { /* Don't use start_arrow() if we're in the same window */ @@ -2798,7 +2796,7 @@ retnomove: #endif return IN_STATUS_LINE; /* Cursor didn't move */ } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS else if (on_sep_line && which_button == MOUSE_LEFT) { if (dragwin != NULL) @@ -2828,7 +2826,7 @@ retnomove: #endif row -= W_WINROW(curwin); -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS col -= W_WINCOL(curwin); #endif @@ -3089,7 +3087,6 @@ mouse_find_win(int *rowp, int *colp UNUS { if (fp->fr_layout == FR_LEAF) break; -#ifdef FEAT_VERTSPLIT if (fp->fr_layout == FR_ROW) { for (fp = fp->fr_child; fp->fr_next != NULL; fp = fp->fr_next) @@ -3099,7 +3096,6 @@ mouse_find_win(int *rowp, int *colp UNUS *colp -= fp->fr_width; } } -#endif else /* fr_layout == FR_COL */ { for (fp = fp->fr_child; fp->fr_next != NULL; fp = fp->fr_next) @@ -3141,7 +3137,7 @@ get_fpos_of_mouse(pos_T *mpos) */ if (row >= wp->w_height) /* In (or below) status line */ return IN_STATUS_LINE; -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS if (col >= wp->w_width) /* In vertical separator line */ return IN_SEP_LINE; #endif
--- a/src/version.c +++ b/src/version.c @@ -646,7 +646,7 @@ static char *(features[]) = #else "-user_commands", #endif -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS "+vertsplit", #else "-vertsplit", @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1611, +/**/ 1610, /**/ 1609,
--- a/src/vim.h +++ b/src/vim.h @@ -810,7 +810,7 @@ extern char *(*dyn_libintl_textdomain)(c #define FINDFILE_DIR 1 /* only directories */ #define FINDFILE_BOTH 2 /* files and directories */ -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS # define W_WINCOL(wp) (wp->w_wincol) # define W_WIDTH(wp) (wp->w_width) # define W_ENDCOL(wp) (wp->w_wincol + wp->w_width)
--- a/src/window.c +++ b/src/window.c @@ -16,9 +16,7 @@ static void win_init(win_T *newp, win_T static void win_init_some(win_T *newp, win_T *oldp); static void frame_comp_pos(frame_T *topfrp, int *row, int *col); static void frame_setheight(frame_T *curfrp, int height); -#ifdef FEAT_VERTSPLIT static void frame_setwidth(frame_T *curfrp, int width); -#endif static void win_exchange(long); static void win_rotate(int, int); static void win_totop(int size, int flags); @@ -32,7 +30,6 @@ static win_T *frame2win(frame_T *frp); static int frame_has_win(frame_T *frp, win_T *wp); static void frame_new_height(frame_T *topfrp, int height, int topfirst, int wfh); static int frame_fixed_height(frame_T *frp); -#ifdef FEAT_VERTSPLIT static int frame_fixed_width(frame_T *frp); static void frame_add_statusline(frame_T *frp); static void frame_new_width(frame_T *topfrp, int width, int leftfirst, int wfw); @@ -40,7 +37,6 @@ static void frame_add_vsep(frame_T *frp) static int frame_minwidth(frame_T *topfrp, win_T *next_curwin); static void frame_fix_width(win_T *wp); #endif -#endif static int win_alloc_firstwin(win_T *oldwin); static void new_frame(win_T *wp); #if defined(FEAT_WINDOWS) || defined(PROTO) @@ -54,10 +50,8 @@ static void win_free(win_T *wp, tabpage_ static void frame_append(frame_T *after, frame_T *frp); static void frame_insert(frame_T *before, frame_T *frp); static void frame_remove(frame_T *frp); -# ifdef FEAT_VERTSPLIT static void win_goto_ver(int up, long count); static void win_goto_hor(int left, long count); -# endif static void frame_add_height(frame_T *frp, int n); static void last_status_rec(frame_T *fr, int statusline); @@ -68,9 +62,7 @@ static int check_snapshot_rec(frame_T *s static win_T *restore_snapshot_rec(frame_T *sn, frame_T *fr); static int frame_check_height(frame_T *topfrp, int height); -#ifdef FEAT_VERTSPLIT static int frame_check_width(frame_T *topfrp, int width); -#endif #endif /* FEAT_WINDOWS */ @@ -143,24 +135,22 @@ do_window( (void)win_split((int)Prenum, 0); break; -#ifdef FEAT_VERTSPLIT /* split current window in two parts, vertically */ case Ctrl_V: case 'v': CHECK_CMDWIN reset_VIsual_and_resel(); /* stop Visual mode */ -# ifdef FEAT_QUICKFIX +#ifdef FEAT_QUICKFIX /* When splitting the quickfix window open a new buffer in it, * don't replicate the quickfix buffer. */ if (bt_quickfix(curbuf)) goto newwindow; -# endif -# ifdef FEAT_GUI +#endif +#ifdef FEAT_GUI need_mouse_correct = TRUE; -# endif +#endif (void)win_split((int)Prenum, WSP_VERT); break; -#endif /* split current window and edit alternate file */ case Ctrl_HAT: @@ -184,7 +174,7 @@ newwindow: vim_snprintf((char *)cbuf, sizeof(cbuf) - 5, "%ld", Prenum); else cbuf[0] = NUL; -#if defined(FEAT_VERTSPLIT) && defined(FEAT_QUICKFIX) +#if defined(FEAT_QUICKFIX) if (nchar == 'v' || nchar == Ctrl_V) STRCAT(cbuf, "v"); #endif @@ -282,14 +272,7 @@ newwindow: case K_DOWN: case Ctrl_J: CHECK_CMDWIN -#ifdef FEAT_VERTSPLIT win_goto_ver(FALSE, Prenum1); -#else - for (wp = curwin; wp->w_next != NULL && Prenum1-- > 0; - wp = wp->w_next) - ; - win_goto(wp); -#endif break; /* cursor to window above */ @@ -297,17 +280,9 @@ newwindow: case K_UP: case Ctrl_K: CHECK_CMDWIN -#ifdef FEAT_VERTSPLIT win_goto_ver(TRUE, Prenum1); -#else - for (wp = curwin; wp->w_prev != NULL && Prenum1-- > 0; - wp = wp->w_prev) - ; - win_goto(wp); -#endif break; -#ifdef FEAT_VERTSPLIT /* cursor to left window */ case 'h': case K_LEFT: @@ -324,7 +299,6 @@ newwindow: CHECK_CMDWIN win_goto_hor(FALSE, Prenum1); break; -#endif /* move window to new tab page */ case 'T': @@ -397,10 +371,8 @@ newwindow: /* move window to the very top/bottom/left/right */ case 'K': case 'J': -#ifdef FEAT_VERTSPLIT case 'H': case 'L': -#endif CHECK_CMDWIN win_totop((int)Prenum, ((nchar == 'H' || nchar == 'L') ? WSP_VERT : 0) @@ -440,7 +412,6 @@ newwindow: win_setheight(Prenum ? (int)Prenum : 9999); break; -#ifdef FEAT_VERTSPLIT /* increase current window width */ case '>': #ifdef FEAT_GUI @@ -464,7 +435,6 @@ newwindow: #endif win_setwidth(Prenum != 0 ? (int)Prenum : 9999); break; -#endif /* jump to tag and split window if tag exists (in preview window) */ #if defined(FEAT_QUICKFIX) @@ -655,7 +625,6 @@ get_wincmd_addr_type(char_u *arg, exarg_ case Ctrl_RSB: case 'g': case Ctrl_G: -#ifdef FEAT_VERTSPLIT case Ctrl_V: case 'v': case 'h': @@ -666,7 +635,6 @@ get_wincmd_addr_type(char_u *arg, exarg_ case 'L': case '>': case '<': -#endif #if defined(FEAT_QUICKFIX) case '}': #endif @@ -831,7 +799,6 @@ win_split_ins( out_flush(); #endif -#ifdef FEAT_VERTSPLIT if (flags & WSP_VERT) { int wmw1; @@ -920,7 +887,6 @@ win_split_ins( } } else -#endif { layout = FR_COL; @@ -998,10 +964,7 @@ win_split_ins( /* Only make all windows the same height if one of them (except oldwin) * is higher than one of the split windows. */ - if (!do_equal && p_ea && size == 0 -#ifdef FEAT_VERTSPLIT - && *p_ead != 'h' -#endif + if (!do_equal && p_ea && size == 0 && *p_ead != 'h' && oldwin->w_frame->fr_parent != NULL) { frp = oldwin->w_frame->fr_parent->fr_child; @@ -1027,11 +990,7 @@ win_split_ins( && ((flags & WSP_BOT) || (flags & WSP_BELOW) || (!(flags & WSP_ABOVE) - && ( -#ifdef FEAT_VERTSPLIT - (flags & WSP_VERT) ? p_spr : -#endif - p_sb)))) + && ( (flags & WSP_VERT) ? p_spr : p_sb)))) { /* new window below/right of current one */ if (new_wp == NULL) @@ -1068,12 +1027,8 @@ win_split_ins( */ if (flags & (WSP_TOP | WSP_BOT)) { -#ifdef FEAT_VERTSPLIT if ((topframe->fr_layout == FR_COL && (flags & WSP_VERT) == 0) || (topframe->fr_layout == FR_ROW && (flags & WSP_VERT) != 0)) -#else - if (topframe->fr_layout == FR_COL) -#endif { curfrp = topframe->fr_child; if (flags & WSP_BOT) @@ -1091,12 +1046,9 @@ win_split_ins( before = FALSE; else if (flags & WSP_ABOVE) before = TRUE; - else -#ifdef FEAT_VERTSPLIT - if (flags & WSP_VERT) + else if (flags & WSP_VERT) before = !p_spr; else -#endif before = !p_sb; } if (curfrp->fr_parent == NULL || curfrp->fr_parent->fr_layout != layout) @@ -1136,7 +1088,6 @@ win_split_ins( set_fraction(oldwin); wp->w_fraction = oldwin->w_fraction; -#ifdef FEAT_VERTSPLIT if (flags & WSP_VERT) { wp->w_p_scr = curwin->w_p_scr; @@ -1194,10 +1145,8 @@ win_split_ins( frame_fix_width(wp); } else -#endif { /* width and column of new window is same as current window */ -#ifdef FEAT_VERTSPLIT if (flags & (WSP_TOP | WSP_BOT)) { wp->w_wincol = 0; @@ -1211,7 +1160,6 @@ win_split_ins( wp->w_vsep_width = oldwin->w_vsep_width; } frp->fr_width = curfrp->fr_width; -#endif /* "new_size" of the current window goes to the new window, use * one row for the status line */ @@ -1234,10 +1182,8 @@ win_split_ins( /* Don't set the status_height for oldwin yet, this might break * frame_fix_height(oldwin), therefore will be set below. */ } -#ifdef FEAT_VERTSPLIT if (flags & WSP_BOT) frame_add_statusline(curfrp); -#endif frame_fix_height(wp); frame_fix_height(oldwin); @@ -1273,15 +1219,11 @@ win_split_ins( */ if (do_equal || dir != 0) win_equal(wp, TRUE, -#ifdef FEAT_VERTSPLIT (flags & WSP_VERT) ? (dir == 'v' ? 'b' : 'h') - : dir == 'h' ? 'b' : -#endif - 'v'); + : dir == 'h' ? 'b' : 'v'); /* Don't change the window height/width to 'winheight' / 'winwidth' if a * size was given. */ -#ifdef FEAT_VERTSPLIT if (flags & WSP_VERT) { i = p_wiw; @@ -1295,7 +1237,6 @@ win_split_ins( # endif } else -#endif { i = p_wh; if (size != 0) @@ -1311,11 +1252,9 @@ win_split_ins( * make the new window the current window */ win_enter(wp, FALSE); -#ifdef FEAT_VERTSPLIT if (flags & WSP_VERT) p_wiw = i; else -#endif p_wh = i; return OK; @@ -1454,7 +1393,6 @@ make_windows( int maxcount; int todo; -#ifdef FEAT_VERTSPLIT if (vertical) { /* Each windows needs at least 'winminwidth' lines and a separator @@ -1463,7 +1401,6 @@ make_windows( - (p_wiw - p_wmw)) / (p_wmw + 1); } else -#endif { /* Each window needs at least 'winminheight' lines and a status line. */ maxcount = (curwin->w_height + curwin->w_status_height @@ -1491,7 +1428,6 @@ make_windows( /* todo is number of windows left to create */ for (todo = count - 1; todo > 0; --todo) -#ifdef FEAT_VERTSPLIT if (vertical) { if (win_split(curwin->w_width - (curwin->w_width - todo) @@ -1499,7 +1435,6 @@ make_windows( break; } else -#endif { if (win_split(curwin->w_height - (curwin->w_height - todo * STATUS_HEIGHT) / (todo + 1) @@ -1587,7 +1522,6 @@ win_exchange(long Prenum) temp = curwin->w_status_height; curwin->w_status_height = wp->w_status_height; wp->w_status_height = temp; -#ifdef FEAT_VERTSPLIT temp = curwin->w_vsep_width; curwin->w_vsep_width = wp->w_vsep_width; wp->w_vsep_width = temp; @@ -1610,7 +1544,6 @@ win_exchange(long Prenum) frame_fix_width(curwin); frame_fix_width(wp); } -#endif (void)win_comp_pos(); /* recompute window positions */ @@ -1640,7 +1573,6 @@ win_rotate(int upwards, int count) need_mouse_correct = TRUE; #endif -#ifdef FEAT_VERTSPLIT /* Check if all frames in this row/col have one window. */ for (frp = curwin->w_frame->fr_parent->fr_child; frp != NULL; frp = frp->fr_next) @@ -1649,7 +1581,6 @@ win_rotate(int upwards, int count) EMSG(_("E443: Cannot rotate when another window is split")); return; } -#endif while (count--) { @@ -1691,15 +1622,13 @@ win_rotate(int upwards, int count) wp1->w_status_height = n; frame_fix_height(wp1); frame_fix_height(wp2); -#ifdef FEAT_VERTSPLIT n = wp2->w_vsep_width; wp2->w_vsep_width = wp1->w_vsep_width; wp1->w_vsep_width = n; frame_fix_width(wp1); frame_fix_width(wp2); -#endif - - /* recompute w_winrow and w_wincol for all windows */ + + /* recompute w_winrow and w_wincol for all windows */ (void)win_comp_pos(); } @@ -1736,7 +1665,7 @@ win_totop(int size, int flags) win_equal(curwin, TRUE, 'v'); } -#if defined(FEAT_GUI) && defined(FEAT_VERTSPLIT) +#if defined(FEAT_GUI) /* When 'guioptions' includes 'L' or 'R' may have to remove or add * scrollbars. Have to update them anyway. */ gui_may_update_scrollbars(); @@ -1766,7 +1695,6 @@ win_move_after(win_T *win1, win_T *win2) height = win1->w_prev->w_status_height; win1->w_prev->w_status_height = win1->w_status_height; win1->w_status_height = height; -#ifdef FEAT_VERTSPLIT if (win1->w_prev->w_vsep_width == 1) { /* Remove the vertical separator from the last-but-one window, @@ -1776,14 +1704,12 @@ win_move_after(win_T *win1, win_T *win2) win1->w_vsep_width = 1; win1->w_frame->fr_width += 1; } -#endif } else if (win2 == lastwin) { height = win1->w_status_height; win1->w_status_height = win2->w_status_height; win2->w_status_height = height; -#ifdef FEAT_VERTSPLIT if (win1->w_vsep_width == 1) { /* Remove the vertical separator from win1, add it to the last @@ -1793,7 +1719,6 @@ win_move_after(win_T *win1, win_T *win2) win1->w_vsep_width = 0; win1->w_frame->fr_width -= 1; } -#endif } win_remove(win1, NULL); frame_remove(win1->w_frame); @@ -1819,11 +1744,7 @@ win_equal( 'b' for both, 0 for using p_ead */ { if (dir == 0) -#ifdef FEAT_VERTSPLIT dir = *p_ead; -#else - dir = 'b'; -#endif win_equal_rec(next_curwin == NULL ? curwin : next_curwin, current, topframe, dir, 0, tabline_height(), (int)Columns, topframe->fr_height); @@ -1861,21 +1782,16 @@ win_equal_rec( /* Set the width/height of this frame. * Redraw when size or position changes */ if (topfr->fr_height != height || topfr->fr_win->w_winrow != row -#ifdef FEAT_VERTSPLIT || topfr->fr_width != width || topfr->fr_win->w_wincol != col -#endif ) { topfr->fr_win->w_winrow = row; frame_new_height(topfr, height, FALSE, FALSE); -#ifdef FEAT_VERTSPLIT topfr->fr_win->w_wincol = col; frame_new_width(topfr, width, FALSE, FALSE); -#endif redraw_all_later(CLEAR); } } -#ifdef FEAT_VERTSPLIT else if (topfr->fr_layout == FR_ROW) { topfr->fr_width = width; @@ -2017,12 +1933,9 @@ win_equal_rec( totwincount -= wincount; } } -#endif else /* topfr->fr_layout == FR_COL */ { -#ifdef FEAT_VERTSPLIT topfr->fr_width = width; -#endif topfr->fr_height = height; if (dir != 'h') /* equalize frame heights */ @@ -2486,18 +2399,8 @@ win_close(win_T *win, int free_buf) curbuf = curwin->w_buffer; close_curwin = TRUE; } - if (p_ea -#ifdef FEAT_VERTSPLIT - && (*p_ead == 'b' || *p_ead == dir) -#endif - ) - win_equal(curwin, TRUE, -#ifdef FEAT_VERTSPLIT - dir -#else - 0 -#endif - ); + if (p_ea && (*p_ead == 'b' || *p_ead == dir)) + win_equal(curwin, TRUE, dir); else win_comp_pos(); if (close_curwin) @@ -2521,7 +2424,7 @@ win_close(win_T *win, int free_buf) if (help_window) restore_snapshot(SNAP_HELP_IDX, close_curwin); -#if defined(FEAT_GUI) && defined(FEAT_VERTSPLIT) +#if defined(FEAT_GUI) /* When 'guioptions' includes 'L' or 'R' may have to remove scrollbars. */ if (gui.in_use && !win_hasvertsplit()) gui_init_which_components(NULL); @@ -2678,10 +2581,8 @@ winframe_remove( /* Remove this frame from the list of frames. */ frame_remove(frp_close); -#ifdef FEAT_VERTSPLIT if (frp_close->fr_parent->fr_layout == FR_COL) { -#endif /* When 'winfixheight' is set, try to find another frame in the column * (as close to the closed frame as possible) to distribute the height * to. */ @@ -2715,7 +2616,6 @@ winframe_remove( } frame_new_height(frp2, frp2->fr_height + frp_close->fr_height, frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE); -#ifdef FEAT_VERTSPLIT *dirp = 'v'; } else @@ -2755,7 +2655,6 @@ winframe_remove( frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE); *dirp = 'h'; } -#endif /* If rows/columns go to a window below/right its positions need to be * updated. Can only be done after the sizes have been updated. */ @@ -2830,11 +2729,9 @@ win_altframe( return alt_tabpage()->tp_curwin->w_frame; frp = win->w_frame; -#ifdef FEAT_VERTSPLIT if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_ROW) b = p_spr; else -#endif b = p_sb; if ((!b && frp->fr_next != NULL) || frp->fr_prev == NULL) return frp->fr_next; @@ -2909,7 +2806,6 @@ frame_new_height( win_new_height(topfrp->fr_win, height - topfrp->fr_win->w_status_height); } -#ifdef FEAT_VERTSPLIT else if (topfrp->fr_layout == FR_ROW) { do @@ -2928,7 +2824,6 @@ frame_new_height( } while (frp != NULL); } -#endif else /* fr_layout == FR_COL */ { /* Complicated case: Resize a column of frames. Resize the bottom @@ -3027,7 +2922,6 @@ frame_fixed_height(frame_T *frp) return TRUE; } -#ifdef FEAT_VERTSPLIT /* * Return TRUE if width of frame "frp" should not be changed because of * the 'winfixwidth' option. @@ -3249,7 +3143,6 @@ frame_fix_width(win_T *wp) { wp->w_frame->fr_width = wp->w_width + wp->w_vsep_width; } -#endif /* * Set frame height from the window it contains. @@ -3272,9 +3165,7 @@ frame_minheight(frame_T *topfrp, win_T * { frame_T *frp; int m; -#ifdef FEAT_VERTSPLIT int n; -#endif if (topfrp->fr_win != NULL) { @@ -3289,7 +3180,6 @@ frame_minheight(frame_T *topfrp, win_T * ++m; } } -#ifdef FEAT_VERTSPLIT else if (topfrp->fr_layout == FR_ROW) { /* get the minimal height from each frame in this row */ @@ -3301,7 +3191,6 @@ frame_minheight(frame_T *topfrp, win_T * m = n; } } -#endif else { /* Add up the minimal heights for all frames in this column. */ @@ -3313,7 +3202,6 @@ frame_minheight(frame_T *topfrp, win_T * return m; } -#ifdef FEAT_VERTSPLIT /* * Compute the minimal width for frame "topfrp". * When "next_curwin" isn't NULL, use p_wiw for this window. @@ -3362,7 +3250,6 @@ frame_minwidth( return m; } -#endif /* @@ -3559,9 +3446,7 @@ win_alloc_firstwin(win_T *oldwin) if (curwin->w_frame == NULL) return FAIL; topframe = curwin->w_frame; -#ifdef FEAT_VERTSPLIT topframe->fr_width = Columns; -#endif topframe->fr_height = Rows - p_ch; topframe->fr_win = curwin; @@ -3592,10 +3477,8 @@ win_init_size(void) { firstwin->w_height = ROWS_AVAIL; topframe->fr_height = ROWS_AVAIL; -#ifdef FEAT_VERTSPLIT firstwin->w_width = Columns; topframe->fr_width = Columns; -#endif } #if defined(FEAT_WINDOWS) || defined(PROTO) @@ -3932,10 +3815,8 @@ enter_tabpage( #endif )) shell_new_rows(); -#ifdef FEAT_VERTSPLIT if (curtab->tp_old_Columns != Columns && starting == 0) shell_new_columns(); /* update window widths */ -#endif #if defined(FEAT_GUI) /* When 'guioptions' includes 'L' or 'R' may have to remove or add @@ -4214,7 +4095,6 @@ win_find_tabpage(win_T *win) } #endif -#ifdef FEAT_VERTSPLIT /* * Move to window above or below "count" times. */ @@ -4340,7 +4220,6 @@ end: if (foundfr != NULL) win_goto(foundfr->fr_win); } -#endif /* * Make window "wp" the current window. @@ -4468,11 +4347,9 @@ win_enter_ext( else if (curwin->w_height == 0) win_setheight(1); -#ifdef FEAT_VERTSPLIT /* set window width to desired minimal value */ if (curwin->w_width < p_wiw && !curwin->w_p_wfw) win_setwidth((int)p_wiw); -#endif #ifdef FEAT_MOUSE setmouse(); /* in case jumped to/from help buffer */ @@ -4592,10 +4469,8 @@ win_alloc(win_T *after UNUSED, int hidde if (!hidden) win_append(after, new_wp); #endif -#ifdef FEAT_VERTSPLIT new_wp->w_wincol = 0; new_wp->w_width = Columns; -#endif /* position the display and the cursor at the top of the file. */ new_wp->w_topline = 1; @@ -4915,7 +4790,7 @@ shell_new_rows(void) #endif } -#if defined(FEAT_VERTSPLIT) || defined(PROTO) +#if defined(FEAT_WINDOWS) || defined(PROTO) /* * Called from win_new_shellsize() after Columns changed. */ @@ -5016,47 +4891,33 @@ frame_comp_pos(frame_T *topfrp, int *row { win_T *wp; frame_T *frp; -#ifdef FEAT_VERTSPLIT int startcol; int startrow; -#endif wp = topfrp->fr_win; if (wp != NULL) { - if (wp->w_winrow != *row -#ifdef FEAT_VERTSPLIT - || wp->w_wincol != *col -#endif - ) + if (wp->w_winrow != *row || wp->w_wincol != *col) { /* position changed, redraw */ wp->w_winrow = *row; -#ifdef FEAT_VERTSPLIT wp->w_wincol = *col; -#endif redraw_win_later(wp, NOT_VALID); wp->w_redr_status = TRUE; } *row += wp->w_height + wp->w_status_height; -#ifdef FEAT_VERTSPLIT *col += wp->w_width + wp->w_vsep_width; -#endif } else { -#ifdef FEAT_VERTSPLIT startrow = *row; startcol = *col; -#endif for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next) { -#ifdef FEAT_VERTSPLIT if (topfrp->fr_layout == FR_ROW) *row = startrow; /* all frames are at the same row */ else *col = startcol; /* all frames are at the same col */ -#endif frame_comp_pos(frp, row, col); } } @@ -5172,7 +5033,6 @@ frame_setheight(frame_T *curfrp, int hei /* * Column of frames: try to change only frames in this column. */ -#ifdef FEAT_VERTSPLIT /* * Do this twice: * 1: compute room available, if it's not enough try resizing the @@ -5181,9 +5041,6 @@ frame_setheight(frame_T *curfrp, int hei * Try not to reduce the height of a window with 'winfixheight' set. */ for (run = 1; run <= 2; ++run) -#else - for (;;) -#endif { room = 0; room_reserved = 0; @@ -5198,11 +5055,9 @@ frame_setheight(frame_T *curfrp, int hei if (frp != curfrp) room -= frame_minheight(frp, NULL); } -#ifdef FEAT_VERTSPLIT if (curfrp->fr_width != Columns) room_cmdline = 0; else -#endif { room_cmdline = Rows - p_ch - (lastwin->w_winrow + lastwin->w_height + lastwin->w_status_height); @@ -5212,19 +5067,14 @@ frame_setheight(frame_T *curfrp, int hei if (height <= room + room_cmdline) break; -#ifdef FEAT_VERTSPLIT if (run == 2 || curfrp->fr_width == Columns) -#endif { if (height > room + room_cmdline) height = room + room_cmdline; break; } -#ifdef FEAT_VERTSPLIT frame_setheight(curfrp->fr_parent, height + frame_minheight(curfrp->fr_parent, NOWIN) - (int)p_wmh - 1); -#endif - /*NOTREACHED*/ } /* @@ -5308,7 +5158,6 @@ frame_setheight(frame_T *curfrp, int hei } } -#if defined(FEAT_VERTSPLIT) || defined(PROTO) /* * Set current window width and take care of repositioning other windows to * fit around it. @@ -5483,7 +5332,6 @@ frame_setwidth(frame_T *curfrp, int widt } } } -#endif /* FEAT_VERTSPLIT */ /* * Check 'winminheight' for a valid value. @@ -5644,7 +5492,6 @@ win_drag_status_line(win_T *dragwin, int showmode(); } -# if defined(FEAT_VERTSPLIT) || defined(PROTO) /* * Separator line of dragwin is dragged "offset" lines right (negative is left). */ @@ -5747,7 +5594,6 @@ win_drag_vsep_line(win_T *dragwin, int o (void)win_comp_pos(); redraw_all_later(NOT_VALID); } -# endif /* FEAT_VERTSPLIT */ #endif /* FEAT_MOUSE */ #endif /* FEAT_WINDOWS */ @@ -5918,7 +5764,7 @@ win_new_height(win_T *wp, int height) invalidate_botline_win(wp); } -#ifdef FEAT_VERTSPLIT +#ifdef FEAT_WINDOWS /* * Set the width of a window. */ @@ -5965,10 +5811,8 @@ command_height(void) /* Find bottom frame with width of screen. */ frp = lastwin->w_frame; -# ifdef FEAT_VERTSPLIT while (frp->fr_width != Columns && frp->fr_parent != NULL) frp = frp->fr_parent; -# endif /* Avoid changing the height of a window with 'winfixheight' set. */ while (frp->fr_prev != NULL && frp->fr_layout == FR_LEAF @@ -6104,14 +5948,12 @@ last_status_rec(frame_T *fr, int statusl redraw_all_later(SOME_VALID); } } -#ifdef FEAT_VERTSPLIT else if (fr->fr_layout == FR_ROW) { /* vertically split windows, set status line for each one */ for (fp = fr->fr_child; fp != NULL; fp = fp->fr_next) last_status_rec(fp, statusline); } -#endif else { /* horizontally split window, set status line for last one */ @@ -6574,9 +6416,7 @@ make_snapshot_rec(frame_T *fr, frame_T * if (*frp == NULL) return; (*frp)->fr_layout = fr->fr_layout; -# ifdef FEAT_VERTSPLIT (*frp)->fr_width = fr->fr_width; -# endif (*frp)->fr_height = fr->fr_height; if (fr->fr_next != NULL) make_snapshot_rec(fr->fr_next, &((*frp)->fr_next)); @@ -6620,9 +6460,7 @@ restore_snapshot( win_T *wp; if (curtab->tp_snapshot[idx] != NULL -# ifdef FEAT_VERTSPLIT && curtab->tp_snapshot[idx]->fr_width == topframe->fr_width -# endif && curtab->tp_snapshot[idx]->fr_height == topframe->fr_height && check_snapshot_rec(curtab->tp_snapshot[idx], topframe) == OK) { @@ -6665,15 +6503,11 @@ restore_snapshot_rec(frame_T *sn, frame_ win_T *wp2; fr->fr_height = sn->fr_height; -# ifdef FEAT_VERTSPLIT fr->fr_width = sn->fr_width; -# endif if (fr->fr_layout == FR_LEAF) { frame_new_height(fr, fr->fr_height, FALSE, FALSE); -# ifdef FEAT_VERTSPLIT frame_new_width(fr, fr->fr_width, FALSE, FALSE); -# endif wp = sn->fr_win; } if (sn->fr_next != NULL) @@ -6811,7 +6645,7 @@ restore_buffer(buf_T *save_curbuf) } #endif -#if (defined(FEAT_GUI) && defined(FEAT_VERTSPLIT)) || defined(PROTO) +#if (defined(FEAT_GUI) && defined(FEAT_WINDOWS)) || defined(PROTO) /* * Return TRUE if there is any vertically split window. */ @@ -7181,7 +7015,7 @@ frame_check_height(frame_T *topfrp, int } #endif -#if defined(FEAT_VERTSPLIT) || defined(PROTO) +#if defined(FEAT_WINDOWS) || defined(PROTO) /* * Return TRUE if "topfrp" and its children are at the right width. */