]> granicus.if.org Git - vim/commitdiff
patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs v8.0.1118
authorBram Moolenaar <Bram@vim.org>
Sat, 16 Sep 2017 18:54:51 +0000 (20:54 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 16 Sep 2017 18:54:51 +0000 (20:54 +0200)
Problem:    FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always
            enabled and only adds 7% to the binary size of the tiny build.
Solution:   Graduate FEAT_WINDOWS.

57 files changed:
src/buffer.c
src/charset.c
src/digraph.c
src/edit.c
src/eval.c
src/evalfunc.c
src/ex_cmds.c
src/ex_cmds2.c
src/ex_docmd.c
src/ex_getln.c
src/feature.h
src/fileio.c
src/fold.c
src/getchar.c
src/globals.h
src/gui.c
src/gui.h
src/gui_athena.c
src/gui_beval.c
src/gui_gtk.c
src/gui_motif.c
src/gui_w32.c
src/if_cscope.c
src/if_lua.c
src/if_mzsch.c
src/if_perl.xs
src/if_py_both.h
src/if_python.c
src/if_python3.c
src/if_ruby.c
src/if_tcl.c
src/main.c
src/mark.c
src/memline.c
src/misc1.c
src/misc2.c
src/move.c
src/netbeans.c
src/normal.c
src/option.c
src/option.h
src/popupmnu.c
src/quickfix.c
src/screen.c
src/search.c
src/spell.c
src/structs.h
src/syntax.c
src/tag.c
src/term.c
src/term.h
src/testdir/test_normal.vim
src/ui.c
src/version.c
src/vim.h
src/window.c
src/workshop.c

index 57330bfa147afc076746f3d2e79adf6e9c3cd502..110dada7a642a0b01df28e5e5dbe9a62d18d8647 100644 (file)
@@ -59,7 +59,7 @@ static void   clear_wininfo(buf_T *buf);
 static void insert_sign(buf_T *buf, signlist_T *prev, signlist_T *next, int id, linenr_T lnum, int typenr);
 #endif
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
 static char *msg_loclist = N_("[Location List]");
 static char *msg_qflist = N_("[Quickfix List]");
 #endif
@@ -458,11 +458,9 @@ close_buffer(
     int                is_curbuf;
     int                nwindows;
     bufref_T   bufref;
-# ifdef FEAT_WINDOWS
     int                is_curwin = (curwin != NULL && curwin->w_buffer == buf);
     win_T      *the_curwin = curwin;
     tabpage_T  *the_curtab = curtab;
-# endif
 #endif
     int                unload_buf = (action != 0);
     int                del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE);
@@ -522,11 +520,8 @@ close_buffer(
     }
 #endif
 
-    if (win != NULL
-#ifdef FEAT_WINDOWS
-       && win_valid_any_tab(win) /* in case autocommands closed the window */
-#endif
-           )
+    /* check no autocommands closed the window */
+    if (win != NULL && win_valid_any_tab(win))
     {
        /* Set b_last_cursor when closing the last window for the buffer.
         * Remember the last cursor position and window options of the buffer.
@@ -581,7 +576,6 @@ aucmd_abort:
 # endif
     }
 
-# ifdef FEAT_WINDOWS
     /* If the buffer was in curwin and the window has changed, go back to that
      * window, if it still exists.  This avoids that ":edit x" triggering a
      * "tabnext" BufUnload autocmd leaves a window behind without a buffer. */
@@ -591,7 +585,6 @@ aucmd_abort:
        goto_tabpage_win(the_curtab, the_curwin);
        unblock_autocmds();
     }
-# endif
 
     nwindows = buf->b_nwindows;
 #endif
@@ -650,13 +643,7 @@ aucmd_abort:
     if (buf == curbuf && !is_curbuf)
        return;
 
-    if (
-#ifdef FEAT_WINDOWS
-       win_valid_any_tab(win) &&
-#else
-       win != NULL &&
-#endif
-                         win->w_buffer == buf)
+    if (win_valid_any_tab(win) && win->w_buffer == buf)
        win->w_buffer = NULL;  /* make sure we don't use the buffer now */
 
     /* Autocommands may have opened or closed windows for this buffer.
@@ -746,11 +733,9 @@ buf_freeall(buf_T *buf, int flags)
 #ifdef FEAT_AUTOCMD
     int                is_curbuf = (buf == curbuf);
     bufref_T   bufref;
-# ifdef FEAT_WINDOWS
     int                is_curwin = (curwin != NULL && curwin->w_buffer == buf);
     win_T      *the_curwin = curwin;
     tabpage_T  *the_curtab = curtab;
-# endif
 
     /* Make sure the buffer isn't closed by autocommands. */
     ++buf->b_locked;
@@ -781,7 +766,6 @@ buf_freeall(buf_T *buf, int flags)
     }
     --buf->b_locked;
 
-# ifdef FEAT_WINDOWS
     /* If the buffer was in curwin and the window has changed, go back to that
      * window, if it still exists.  This avoids that ":edit x" triggering a
      * "tabnext" BufUnload autocmd leaves a window behind without a buffer. */
@@ -791,7 +775,6 @@ buf_freeall(buf_T *buf, int flags)
        goto_tabpage_win(the_curtab, the_curwin);
        unblock_autocmds();
     }
-# endif
 
 # ifdef FEAT_EVAL
     if (aborting())        /* autocmds may abort script processing */
@@ -818,7 +801,6 @@ buf_freeall(buf_T *buf, int flags)
 
 #ifdef FEAT_FOLDING
     /* No folds in an empty buffer. */
-# ifdef FEAT_WINDOWS
     {
        win_T           *win;
        tabpage_T       *tp;
@@ -827,10 +809,6 @@ buf_freeall(buf_T *buf, int flags)
            if (win->w_buffer == buf)
                clearFolding(win);
     }
-# else
-    if (curwin != NULL && curwin->w_buffer == buf)
-       clearFolding(curwin);
-# endif
 #endif
 
 #ifdef FEAT_TCL
@@ -1001,7 +979,7 @@ goto_buffer(
     int                dir,
     int                count)
 {
-# if defined(FEAT_WINDOWS) && defined(HAS_SWAP_EXISTS_ACTION)
+# if defined(HAS_SWAP_EXISTS_ACTION)
     bufref_T   old_curbuf;
 
     set_bufref(&old_curbuf, curbuf);
@@ -1010,7 +988,7 @@ goto_buffer(
 # endif
     (void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO,
                                             start, dir, count, eap->forceit);
-# if defined(FEAT_WINDOWS) && defined(HAS_SWAP_EXISTS_ACTION)
+# if defined(HAS_SWAP_EXISTS_ACTION)
     if (swap_exists_action == SEA_QUIT && *eap->cmd == 's')
     {
 #  if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
@@ -1269,11 +1247,9 @@ empty_curbuf(
     }
 
     set_bufref(&bufref, buf);
-#ifdef FEAT_WINDOWS
     if (close_others)
        /* Close any other windows on this buffer, then make it empty. */
        close_windows(buf, TRUE);
-#endif
 
     setpcmark();
     retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE,
@@ -1410,11 +1386,9 @@ do_buffer(
     if (unload)
     {
        int     forward;
-# if defined(FEAT_AUTOCMD) || defined(FEAT_WINDOWS)
        bufref_T bufref;
 
        set_bufref(&bufref, buf);
-# endif
 
        /* When unloading or deleting a buffer that's already unloaded and
         * unlisted: fail silently. */
@@ -1461,33 +1435,28 @@ do_buffer(
        if (bp == NULL && buf == curbuf)
            return empty_curbuf(TRUE, forceit, action);
 
-#ifdef FEAT_WINDOWS
        /*
         * If the deleted buffer is the current one, close the current window
         * (unless it's the only window).  Repeat this so long as we end up in
         * a window with this buffer.
         */
        while (buf == curbuf
-# ifdef FEAT_AUTOCMD
+#ifdef FEAT_AUTOCMD
                   && !(curwin->w_closing || curwin->w_buffer->b_locked > 0)
-# endif
+#endif
                   && (!ONE_WINDOW || first_tabpage->tp_next != NULL))
        {
            if (win_close(curwin, FALSE) == FAIL)
                break;
        }
-#endif
 
        /*
         * If the buffer to be deleted is not the current one, delete it here.
         */
        if (buf != curbuf)
        {
-#ifdef FEAT_WINDOWS
            close_windows(buf, FALSE);
-           if (buf != curbuf && bufref_valid(&bufref))
-#endif
-               if (buf->b_nwindows <= 0)
+           if (buf != curbuf && bufref_valid(&bufref) && buf->b_nwindows <= 0)
                    close_buffer(NULL, buf, action, FALSE);
            return OK;
        }
@@ -1606,7 +1575,6 @@ do_buffer(
      */
     if (action == DOBUF_SPLIT)     /* split window first */
     {
-# ifdef FEAT_WINDOWS
        /* If 'switchbuf' contains "useopen": jump to first window containing
         * "buf" if one exists */
        if ((swb_flags & SWB_USEOPEN) && buf_jump_open_win(buf))
@@ -1616,7 +1584,6 @@ do_buffer(
        if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf))
            return OK;
        if (win_split(0, 0) == FAIL)
-# endif
            return FAIL;
     }
 #endif
@@ -1719,30 +1686,24 @@ set_curbuf(buf_T *buf, int action)
        if (prevbuf == curwin->w_buffer)
            reset_synblock(curwin);
 #endif
-#ifdef FEAT_WINDOWS
        if (unload)
            close_windows(prevbuf, FALSE);
-#endif
 #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
        if (bufref_valid(&bufref) && !aborting())
 #else
        if (bufref_valid(&bufref))
 #endif
        {
-#ifdef FEAT_WINDOWS
            win_T  *previouswin = curwin;
-#endif
            if (prevbuf == curbuf)
                u_sync(FALSE);
            close_buffer(prevbuf == curwin->w_buffer ? curwin : NULL, prevbuf,
                    unload ? action : (action == DOBUF_GOTO
                        && !buf_hide(prevbuf)
                        && !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0, FALSE);
-#ifdef FEAT_WINDOWS
            if (curwin != previouswin && win_valid(previouswin))
              /* autocommands changed curwin, Grr! */
              curwin = previouswin;
-#endif
        }
     }
 #ifdef FEAT_AUTOCMD
@@ -1751,12 +1712,9 @@ set_curbuf(buf_T *buf, int action)
      * If curwin->w_buffer is null, enter_buffer() will make it valid again */
     if ((buf_valid(buf) && buf != curbuf
 # ifdef FEAT_EVAL
-           && !aborting()
-# endif
-# ifdef FEAT_WINDOWS
-        ) || curwin->w_buffer == NULL
+               && !aborting()
 # endif
-       )
+       ) || curwin->w_buffer == NULL)
 #endif
     {
        enter_buffer(buf);
@@ -2327,9 +2285,7 @@ buflist_getfile(
     int                forceit)
 {
     buf_T      *buf;
-#ifdef FEAT_WINDOWS
     win_T      *wp = NULL;
-#endif
     pos_T      *fpos;
     colnr_T    col;
 
@@ -2367,7 +2323,6 @@ buflist_getfile(
     else
        col = 0;
 
-#ifdef FEAT_WINDOWS
     if (options & GETF_SWITCH)
     {
        /* If 'switchbuf' contains "useopen": jump to first window containing
@@ -2393,7 +2348,6 @@ buflist_getfile(
            RESET_BINDING(curwin);
        }
     }
-#endif
 
     ++RedrawingDisabled;
     if (GETFILE_SUCCESS(getfile(buf->b_fnum, NULL, NULL,
@@ -2598,7 +2552,6 @@ buflist_findpat(
                        {
                            /* Ignore the match if the buffer is not open in
                             * the current tab. */
-#ifdef FEAT_WINDOWS
                            win_T       *wp;
 
                            FOR_ALL_WINDOWS(wp)
@@ -2606,10 +2559,6 @@ buflist_findpat(
                                    break;
                            if (wp == NULL)
                                continue;
-#else
-                           if (curwin->w_buffer != buf)
-                               continue;
-#endif
                        }
                        if (match >= 0)         /* already found a match */
                        {
@@ -3089,7 +3038,10 @@ buflist_list(exarg_T *eap)
 #ifdef FEAT_TERMINAL
        if (term_job_running(buf->b_term))
        {
-           ro_char = 'R';
+           if (term_none_open(buf->b_term))
+               ro_char = '?';
+           else
+               ro_char = 'R';
            changed_char = ' ';  /* bufIsChanged() returns TRUE to avoid
                                  * closing, but it's not actually changed. */
        }
@@ -3292,9 +3244,7 @@ buf_name_changed(buf_T *buf)
 #ifdef FEAT_TITLE
     maketitle();               /* set window title */
 #endif
-#ifdef FEAT_WINDOWS
     status_redraw_all();       /* status lines need to be redrawn */
-#endif
     fmarks_check_names(buf);   /* check named file marks */
     ml_timestamp(buf);         /* reset timestamp */
 }
@@ -4422,7 +4372,7 @@ build_stl_str_hl(
            break;
 #endif
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        case STL_PREVIEWFLAG:
        case STL_PREVIEWFLAG_ALT:
            itemisflag = TRUE;
@@ -4908,7 +4858,6 @@ alist_name(aentry_T *aep)
     return bp->b_fname;
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * do_arg_all(): Open up to 'count' windows, one for each argument.
  */
@@ -5057,23 +5006,19 @@ do_arg_all(
                        }
 #endif
                    }
-#ifdef FEAT_WINDOWS
                    /* don't close last window */
                    if (ONE_WINDOW
                            && (first_tabpage->tp_next == NULL || !had_tab))
-#endif
                        use_firstwin = TRUE;
-#ifdef FEAT_WINDOWS
                    else
                    {
                        win_close(wp, !buf_hide(buf) && !bufIsChanged(buf));
-# ifdef FEAT_AUTOCMD
+#ifdef FEAT_AUTOCMD
                        /* check if autocommands removed the next window */
                        if (!win_valid(wpnext))
                            wpnext = firstwin;  /* start all over... */
-# endif
-                   }
 #endif
+                   }
                }
            }
        }
@@ -5105,13 +5050,11 @@ do_arg_all(
     last_curwin = curwin;
     last_curtab = curtab;
     win_enter(lastwin, FALSE);
-#ifdef FEAT_WINDOWS
     /* ":drop all" should re-use an empty window to avoid "--remote-tab"
      * leaving an empty tab page when executed locally. */
     if (keep_tabs && BUFEMPTY() && curbuf->b_nwindows == 1
                            && curbuf->b_ffname == NULL && !curbuf->b_changed)
        use_firstwin = TRUE;
-#endif
 
     for (i = 0; i < count && i < opened_len && !got_int; ++i)
     {
@@ -5222,10 +5165,8 @@ ex_buffer_all(exarg_T *eap)
     int                r;
     int                count;          /* Maximum number of windows to open. */
     int                all;            /* When TRUE also load inactive buffers. */
-#ifdef FEAT_WINDOWS
     int                had_tab = cmdmod.tab;
     tabpage_T  *tpnext;
-#endif
 
     if (eap->addr_count == 0)  /* make as many windows as possible */
        count = 9999;
@@ -5246,25 +5187,20 @@ ex_buffer_all(exarg_T *eap)
      * Close superfluous windows (two windows for the same buffer).
      * Also close windows that are not full-width.
      */
-#ifdef FEAT_WINDOWS
     if (had_tab > 0)
        goto_tabpage_tp(first_tabpage, TRUE, TRUE);
     for (;;)
     {
-#endif
        tpnext = curtab->tp_next;
        for (wp = firstwin; wp != NULL; wp = wpnext)
        {
            wpnext = wp->w_next;
            if ((wp->w_buffer->b_nwindows > 1
-#ifdef FEAT_WINDOWS
                    || ((cmdmod.split & WSP_VERT)
                        ? wp->w_height + wp->w_status_height < Rows - p_ch
                                                            - tabline_height()
                        : wp->w_width != Columns)
-                   || (had_tab > 0 && wp != firstwin)
-#endif
-                   ) && !ONE_WINDOW
+                   || (had_tab > 0 && wp != firstwin)) && !ONE_WINDOW
 #ifdef FEAT_AUTOCMD
                    && !(wp->w_closing || wp->w_buffer->b_locked > 0)
 #endif
@@ -5282,13 +5218,11 @@ ex_buffer_all(exarg_T *eap)
                ++open_wins;
        }
 
-#ifdef FEAT_WINDOWS
        /* Without the ":tab" modifier only do the current tab page. */
        if (had_tab == 0 || tpnext == NULL)
            break;
        goto_tabpage_tp(tpnext, TRUE, TRUE);
     }
-#endif
 
     /*
      * Go through the buffer list.  When a buffer doesn't have a window yet,
@@ -5309,7 +5243,6 @@ ex_buffer_all(exarg_T *eap)
        if ((!all && buf->b_ml.ml_mfp == NULL) || !buf->b_p_bl)
            continue;
 
-#ifdef FEAT_WINDOWS
        if (had_tab != 0)
        {
            /* With the ":tab" modifier don't move the window. */
@@ -5319,7 +5252,6 @@ ex_buffer_all(exarg_T *eap)
                wp = NULL;
        }
        else
-#endif
        {
            /* Check if this buffer already has a window */
            FOR_ALL_WINDOWS(wp)
@@ -5401,11 +5333,9 @@ ex_buffer_all(exarg_T *eap)
        if (aborting())
            break;
 #endif
-#ifdef FEAT_WINDOWS
        /* When ":tab" was used open a new tab for a new window repeatedly. */
        if (had_tab > 0 && tabpage_index(NULL) <= p_tpm)
            cmdmod.tab = 9999;
-#endif
     }
 #ifdef FEAT_AUTOCMD
     --autocmd_no_enter;
@@ -5446,7 +5376,6 @@ ex_buffer_all(exarg_T *eap)
 }
 # endif /* FEAT_LISTCMDS */
 
-#endif /* FEAT_WINDOWS */
 
 static int  chk_modeline(linenr_T, int);
 
@@ -5673,10 +5602,8 @@ read_viminfo_bufferlist(
 write_viminfo_bufferlist(FILE *fp)
 {
     buf_T      *buf;
-#ifdef FEAT_WINDOWS
     win_T      *win;
     tabpage_T  *tp;
-#endif
     char_u     *line;
     int                max_buffers;
 
@@ -5692,12 +5619,8 @@ write_viminfo_bufferlist(FILE *fp)
     if (line == NULL)
        return;
 
-#ifdef FEAT_WINDOWS
     FOR_ALL_TAB_WINDOWS(tp, win)
        set_last_cursor(win);
-#else
-    set_last_cursor(curwin);
-#endif
 
     fputs(_("\n# Buffer list:\n"), fp);
     FOR_ALL_BUFFERS(buf)
@@ -5810,7 +5733,7 @@ buf_hide(buf_T *buf)
     char_u *
 buf_spname(buf_T *buf)
 {
-#if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)
+#if defined(FEAT_QUICKFIX)
     if (bt_quickfix(buf))
     {
        win_T       *win;
@@ -5888,9 +5811,7 @@ restore_win_for_buf(
 }
 #endif
 
-#if (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \
-       || defined(SWITCH_TO_WIN) \
-       || defined(PROTO)
+#if defined(FEAT_QUICKFIX) || defined(SWITCH_TO_WIN) || defined(PROTO)
 /*
  * Find a window for buffer "buf".
  * If found OK is returned and "wp" and "tp" are set to the window and tabpage.
index 8b83f680682dc2d391e8c87c3a8f78109c34c902..4f79c90aac6ad3d550f0a04523619198b7081fef 100644 (file)
@@ -1092,10 +1092,7 @@ win_lbr_chartabsize(
            && VIM_ISBREAK(c)
            && !VIM_ISBREAK((int)s[1])
            && wp->w_p_wrap
-# ifdef FEAT_WINDOWS
-           && wp->w_width != 0
-# endif
-       )
+           && wp->w_width != 0)
     {
        /*
         * Count all characters from first non-blank after a blank up to next
@@ -1249,10 +1246,8 @@ 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_WINDOWS
     if (wp->w_width == 0)      /* there is no border */
        return FALSE;
-# endif
     width1 = W_WIDTH(wp) - win_col_off(wp);
     if ((int)vcol < width1 - 1)
        return FALSE;
@@ -2029,8 +2024,7 @@ hex2nr(int c)
     return c - '0';
 }
 
-#if defined(FEAT_TERMRESPONSE) \
-       || (defined(FEAT_GUI_GTK) && defined(FEAT_WINDOWS)) || defined(PROTO)
+#if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) || defined(PROTO)
 /*
  * Convert two hex characters to a byte.
  * Return -1 if one of the characters is not hex.
index 5e092c36f72bd5cf346f4d00e7e7167c21a56028..0b78af745118ea2bbce783cc84f934e70deb99d2 100644 (file)
@@ -2426,9 +2426,7 @@ ex_loadkeymap(exarg_T *eap)
     p_cpo = save_cpo;
 
     curbuf->b_kmap_state |= KEYMAP_LOADED;
-#ifdef FEAT_WINDOWS
     status_redraw_curbuf();
-#endif
 }
 
 /*
@@ -2462,9 +2460,7 @@ keymap_unload(void)
 
     ga_clear(&curbuf->b_kmap_ga);
     curbuf->b_kmap_state &= ~KEYMAP_LOADED;
-#ifdef FEAT_WINDOWS
     status_redraw_curbuf();
-#endif
 }
 
 #endif /* FEAT_KEYMAP */
index 6fd1245390b10d98709c9bd22e7fef2d53a2576c..447e2ee29e05410b3f9b9e199d4b680998dd755b 100644 (file)
@@ -1360,7 +1360,7 @@ doESCkey:
            /* FALLTHROUGH */
        case CAR:
        case NL:
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
            /* In a quickfix window a <CR> jumps to the error under the
             * cursor. */
            if (bt_quickfix(curbuf) && c == CAR)
@@ -4045,22 +4045,16 @@ ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
     static buf_T *
 ins_compl_next_buf(buf_T *buf, int flag)
 {
-#ifdef FEAT_WINDOWS
     static win_T *wp;
-#endif
 
     if (flag == 'w')           /* just windows */
     {
-#ifdef FEAT_WINDOWS
        if (buf == curbuf)      /* first call for this flag/expansion */
            wp = curwin;
        while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
                && wp->w_buffer->b_scanned)
            ;
        buf = wp->w_buffer;
-#else
-       buf = curbuf;
-#endif
     }
     else
        /* 'b' (just loaded buffers), 'u' (just non-loaded buffers) or 'U'
@@ -8540,7 +8534,7 @@ ins_ctrl_hat(void)
     if (gui.in_use)
        gui_update_cursor(TRUE, FALSE);
 #endif
-#if defined(FEAT_WINDOWS) && defined(FEAT_KEYMAP)
+#if defined(FEAT_KEYMAP)
     /* Show/unshow value of 'keymap' in status lines. */
     status_redraw_curbuf();
 #endif
@@ -9382,7 +9376,6 @@ ins_mouse(int c)
     tpos = curwin->w_cursor;
     if (do_mouse(NULL, c, BACKWARD, 1L, 0))
     {
-#ifdef FEAT_WINDOWS
        win_T   *new_curwin = curwin;
 
        if (curwin != old_curwin && win_valid(old_curwin))
@@ -9392,40 +9385,32 @@ ins_mouse(int c)
            curwin = old_curwin;
            curbuf = curwin->w_buffer;
        }
-#endif
        start_arrow(curwin == old_curwin ? &tpos : NULL);
-#ifdef FEAT_WINDOWS
        if (curwin != new_curwin && win_valid(new_curwin))
        {
            curwin = new_curwin;
            curbuf = curwin->w_buffer;
        }
-#endif
 # ifdef FEAT_CINDENT
        can_cindent = TRUE;
 # endif
     }
 
-#ifdef FEAT_WINDOWS
     /* redraw status lines (in case another window became active) */
     redraw_statuslines();
-#endif
 }
 
     static void
 ins_mousescroll(int dir)
 {
     pos_T      tpos;
-# if defined(FEAT_WINDOWS)
     win_T      *old_curwin = curwin, *wp;
-# endif
 # ifdef FEAT_INS_EXPAND
     int                did_scroll = FALSE;
 # endif
 
     tpos = curwin->w_cursor;
 
-# ifdef FEAT_WINDOWS
     if (mouse_row >= 0 && mouse_col >= 0)
     {
        int row, col;
@@ -9441,16 +9426,11 @@ ins_mousescroll(int dir)
        curbuf = curwin->w_buffer;
     }
     if (curwin == old_curwin)
-# endif
        undisplay_dollar();
 
 # ifdef FEAT_INS_EXPAND
     /* Don't scroll the window in which completion is being done. */
-    if (!pum_visible()
-#  if defined(FEAT_WINDOWS)
-           || curwin != old_curwin
-#  endif
-           )
+    if (!pum_visible() || curwin != old_curwin)
 # endif
     {
        if (dir == MSCR_DOWN || dir == MSCR_UP)
@@ -9479,12 +9459,10 @@ ins_mousescroll(int dir)
 # endif
     }
 
-# ifdef FEAT_WINDOWS
     curwin->w_redr_status = TRUE;
 
     curwin = old_curwin;
     curbuf = curwin->w_buffer;
-# endif
 
 # ifdef FEAT_INS_EXPAND
     /* The popup menu may overlay the window, need to redraw it.
@@ -9883,7 +9861,6 @@ ins_pageup(void)
 
     undisplay_dollar();
 
-#ifdef FEAT_WINDOWS
     if (mod_mask & MOD_MASK_CTRL)
     {
        /* <C-PageUp>: tab page back */
@@ -9894,7 +9871,6 @@ ins_pageup(void)
        }
        return;
     }
-#endif
 
     tpos = curwin->w_cursor;
     if (onepage(BACKWARD, 1L) == OK)
@@ -9946,7 +9922,6 @@ ins_pagedown(void)
 
     undisplay_dollar();
 
-#ifdef FEAT_WINDOWS
     if (mod_mask & MOD_MASK_CTRL)
     {
        /* <C-PageDown>: tab page forward */
@@ -9957,7 +9932,6 @@ ins_pagedown(void)
        }
        return;
     }
-#endif
 
     tpos = curwin->w_cursor;
     if (onepage(FORWARD, 1L) == OK)
index b4250de171f1c51e4c7edaf91b1c9009df14164f..0d954a0ee1dc6b95e6edfcbb7d818ed1d856e78b 100644 (file)
@@ -211,9 +211,7 @@ static char_u *skip_var_one(char_u *arg);
 static void list_glob_vars(int *first);
 static void list_buf_vars(int *first);
 static void list_win_vars(int *first);
-#ifdef FEAT_WINDOWS
 static void list_tab_vars(int *first);
-#endif
 static void list_vim_vars(int *first);
 static void list_script_vars(int *first);
 static char_u *list_arg_vars(exarg_T *eap, char_u *arg, int *first);
@@ -1205,9 +1203,7 @@ ex_let(exarg_T *eap)
            list_glob_vars(&first);
            list_buf_vars(&first);
            list_win_vars(&first);
-#ifdef FEAT_WINDOWS
            list_tab_vars(&first);
-#endif
            list_script_vars(&first);
            list_func_vars(&first);
            list_vim_vars(&first);
@@ -1469,7 +1465,6 @@ list_win_vars(int *first)
                                                 (char_u *)"w:", TRUE, first);
 }
 
-#ifdef FEAT_WINDOWS
 /*
  * List tab page variables.
  */
@@ -1479,7 +1474,6 @@ list_tab_vars(int *first)
     list_hashtable_vars(&curtab->tp_vars->dv_hashtab,
                                                 (char_u *)"t:", TRUE, first);
 }
-#endif
 
 /*
  * List Vim variables.
@@ -1565,9 +1559,7 @@ list_arg_vars(exarg_T *eap, char_u *arg, int *first)
                                case 'g': list_glob_vars(first); break;
                                case 'b': list_buf_vars(first); break;
                                case 'w': list_win_vars(first); break;
-#ifdef FEAT_WINDOWS
                                case 't': list_tab_vars(first); break;
-#endif
                                case 'v': list_vim_vars(first); break;
                                case 's': list_script_vars(first); break;
                                case 'l': list_func_vars(first); break;
@@ -3075,9 +3067,7 @@ get_user_var_name(expand_T *xp, int idx)
     static long_u      gdone;
     static long_u      bdone;
     static long_u      wdone;
-#ifdef FEAT_WINDOWS
     static long_u      tdone;
-#endif
     static int         vidx;
     static hashitem_T  *hi;
     hashtab_T          *ht;
@@ -3085,9 +3075,7 @@ get_user_var_name(expand_T *xp, int idx)
     if (idx == 0)
     {
        gdone = bdone = wdone = vidx = 0;
-#ifdef FEAT_WINDOWS
        tdone = 0;
-#endif
     }
 
     /* Global variables */
@@ -3130,7 +3118,6 @@ get_user_var_name(expand_T *xp, int idx)
        return cat_prefix_varname('w', hi->hi_key);
     }
 
-#ifdef FEAT_WINDOWS
     /* t: variables */
     ht = &curtab->tp_vars->dv_hashtab;
     if (tdone < ht->ht_used)
@@ -3143,7 +3130,6 @@ get_user_var_name(expand_T *xp, int idx)
            ++hi;
        return cat_prefix_varname('t', hi->hi_key);
     }
-#endif
 
     /* v: variables */
     if (vidx < VV_LEN)
@@ -5238,9 +5224,7 @@ garbage_collect(int testing)
     win_T      *wp;
     int                i;
     int                did_free = FALSE;
-#ifdef FEAT_WINDOWS
     tabpage_T  *tp;
-#endif
 
     if (!testing)
     {
@@ -5283,13 +5267,10 @@ garbage_collect(int testing)
                                                                  NULL, NULL);
 #endif
 
-#ifdef FEAT_WINDOWS
     /* tabpage-local variables */
     FOR_ALL_TABPAGES(tp)
        abort = abort || set_ref_in_item(&tp->tp_winvar.di_tv, copyID,
                                                                  NULL, NULL);
-#endif
-
     /* global variables */
     abort = abort || set_ref_in_ht(&globvarht, copyID, NULL);
 
@@ -7389,9 +7370,7 @@ find_var_in_ht(
            case 'v': return &vimvars_var;
            case 'b': return &curbuf->b_bufvar;
            case 'w': return &curwin->w_winvar;
-#ifdef FEAT_WINDOWS
            case 't': return &curtab->tp_winvar;
-#endif
            case 'l': return get_funccal_local_var();
            case 'a': return get_funccal_args_var();
        }
@@ -7461,10 +7440,8 @@ find_var_ht(char_u *name, char_u **varname)
        return &curbuf->b_vars->dv_hashtab;
     if (*name == 'w')                          /* window variable */
        return &curwin->w_vars->dv_hashtab;
-#ifdef FEAT_WINDOWS
     if (*name == 't')                          /* tab page variable */
        return &curtab->tp_vars->dv_hashtab;
-#endif
     if (*name == 'v')                          /* v: variable */
        return &vimvarht;
     if (*name == 'a')                          /* a: function argument */
@@ -8386,14 +8363,11 @@ find_win_by_nr(
     typval_T   *vp,
     tabpage_T  *tp UNUSED)     /* NULL for current tab page */
 {
-#ifdef FEAT_WINDOWS
     win_T      *wp;
-#endif
     int                nr;
 
     nr = (int)get_tv_number_chk(vp, NULL);
 
-#ifdef FEAT_WINDOWS
     if (nr < 0)
        return NULL;
     if (nr == 0)
@@ -8412,11 +8386,6 @@ find_win_by_nr(
     if (nr >= LOWEST_WIN_ID)
        return NULL;
     return wp;
-#else
-    if (nr == 0 || nr == 1 || nr == curwin->w_id)
-       return curwin;
-    return NULL;
-#endif
 }
 
 /*
@@ -8465,18 +8434,14 @@ getwinvar(
     dictitem_T *v;
     tabpage_T  *tp = NULL;
     int                done = FALSE;
-#ifdef FEAT_WINDOWS
     win_T      *oldcurwin;
     tabpage_T  *oldtabpage;
     int                need_switch_win;
-#endif
 
-#ifdef FEAT_WINDOWS
     if (off == 1)
        tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
     else
        tp = curtab;
-#endif
     win = find_win_by_nr(&argvars[off], tp);
     varname = get_tv_string_chk(&argvars[off + 1]);
     ++emsg_off;
@@ -8486,14 +8451,12 @@ getwinvar(
 
     if (win != NULL && varname != NULL)
     {
-#ifdef FEAT_WINDOWS
        /* Set curwin to be our win, temporarily.  Also set the tabpage,
         * otherwise the window is not valid. Only do this when needed,
         * autocommands get blocked. */
        need_switch_win = !(tp == curtab && win == curwin);
        if (!need_switch_win
                  || switch_win(&oldcurwin, &oldtabpage, win, tp, TRUE) == OK)
-#endif
        {
            if (*varname == '&')
            {
@@ -8526,11 +8489,9 @@ getwinvar(
            }
        }
 
-#ifdef FEAT_WINDOWS
        if (need_switch_win)
            /* restore previous notion of curwin */
            restore_win(oldcurwin, oldtabpage, TRUE);
-#endif
     }
 
     if (!done && argvars[off + 2].v_type != VAR_UNKNOWN)
@@ -8547,11 +8508,9 @@ getwinvar(
 setwinvar(typval_T *argvars, typval_T *rettv UNUSED, int off)
 {
     win_T      *win;
-#ifdef FEAT_WINDOWS
     win_T      *save_curwin;
     tabpage_T  *save_curtab;
     int                need_switch_win;
-#endif
     char_u     *varname, *winvarname;
     typval_T   *varp;
     char_u     nbuf[NUMBUFLEN];
@@ -8560,23 +8519,19 @@ setwinvar(typval_T *argvars, typval_T *rettv UNUSED, int off)
     if (check_restricted() || check_secure())
        return;
 
-#ifdef FEAT_WINDOWS
     if (off == 1)
        tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
     else
        tp = curtab;
-#endif
     win = find_win_by_nr(&argvars[off], tp);
     varname = get_tv_string_chk(&argvars[off + 1]);
     varp = &argvars[off + 2];
 
     if (win != NULL && varname != NULL && varp != NULL)
     {
-#ifdef FEAT_WINDOWS
        need_switch_win = !(tp == curtab && win == curwin);
        if (!need_switch_win
               || switch_win(&save_curwin, &save_curtab, win, tp, TRUE) == OK)
-#endif
        {
            if (*varname == '&')
            {
@@ -8602,10 +8557,8 @@ setwinvar(typval_T *argvars, typval_T *rettv UNUSED, int off)
                }
            }
        }
-#ifdef FEAT_WINDOWS
        if (need_switch_win)
            restore_win(save_curwin, save_curtab, TRUE);
-#endif
     }
 }
 
index d438a89126c8fb2d05cc0d7d7994b336b3e07889..8d370d49a20c4449ab1ce2cc49a1a84ca339d7ae 100644 (file)
@@ -1638,16 +1638,13 @@ f_bufnr(typval_T *argvars, typval_T *rettv)
     static void
 buf_win_common(typval_T *argvars, typval_T *rettv, int get_nr)
 {
-#ifdef FEAT_WINDOWS
     win_T      *wp;
     int                winnr = 0;
-#endif
     buf_T      *buf;
 
     (void)get_tv_number(&argvars[0]);      /* issue errmsg if type error */
     ++emsg_off;
     buf = get_buf_tv(&argvars[0], TRUE);
-#ifdef FEAT_WINDOWS
     FOR_ALL_WINDOWS(wp)
     {
        ++winnr;
@@ -1655,10 +1652,6 @@ buf_win_common(typval_T *argvars, typval_T *rettv, int get_nr)
            break;
     }
     rettv->vval.v_number = (wp != NULL ? (get_nr ? winnr : wp->w_id) : -1);
-#else
-    rettv->vval.v_number = (curwin->w_buffer == buf
-                                         ? (get_nr ? 1 : curwin->w_id) : -1);
-#endif
     --emsg_off;
 }
 
@@ -4390,9 +4383,7 @@ f_getchar(typval_T *argvars, typval_T *rettv)
            int         col = mouse_col;
            win_T       *win;
            linenr_T    lnum;
-# ifdef FEAT_WINDOWS
            win_T       *wp;
-# endif
            int         winnr = 1;
 
            if (row >= 0 && col >= 0)
@@ -4403,10 +4394,8 @@ f_getchar(typval_T *argvars, typval_T *rettv)
                if (win == NULL)
                    return;
                (void)mouse_comp_pos(win, &row, &col, &lnum);
-# ifdef FEAT_WINDOWS
                for (wp = firstwin; wp != win; wp = wp->w_next)
                    ++winnr;
-# endif
                set_vim_var_nr(VV_MOUSE_WIN, winnr);
                set_vim_var_nr(VV_MOUSE_WINID, win->w_id);
                set_vim_var_nr(VV_MOUSE_LNUM, lnum);
@@ -5105,7 +5094,6 @@ f_getregtype(typval_T *argvars, typval_T *rettv)
     rettv->vval.v_string = vim_strsave(buf);
 }
 
-#ifdef FEAT_WINDOWS
 /*
  * Returns information (variables, options, etc.) about a tab page
  * as a dictionary.
@@ -5137,7 +5125,6 @@ get_tabpage_info(tabpage_T *tp, int tp_idx)
 
     return dict;
 }
-#endif
 
 /*
  * "gettabinfo()" function
@@ -5145,7 +5132,6 @@ get_tabpage_info(tabpage_T *tp, int tp_idx)
     static void
 f_gettabinfo(typval_T *argvars, typval_T *rettv)
 {
-#ifdef FEAT_WINDOWS
     tabpage_T  *tp, *tparg = NULL;
     dict_T     *d;
     int                tpnr = 0;
@@ -5173,7 +5159,6 @@ f_gettabinfo(typval_T *argvars, typval_T *rettv)
        if (tparg != NULL)
            return;
     }
-#endif
 }
 
 /*
@@ -5228,7 +5213,6 @@ f_gettabwinvar(typval_T *argvars, typval_T *rettv)
     getwinvar(argvars, rettv, 1);
 }
 
-#ifdef FEAT_WINDOWS
 /*
  * Returns information about a window as a dictionary.
  */
@@ -5262,7 +5246,6 @@ get_win_info(win_T *wp, short tpnr, short winnr)
 
     return dict;
 }
-#endif
 
 /*
  * "getwininfo()" function
@@ -5270,17 +5253,14 @@ get_win_info(win_T *wp, short tpnr, short winnr)
     static void
 f_getwininfo(typval_T *argvars, typval_T *rettv)
 {
-#ifdef FEAT_WINDOWS
     tabpage_T  *tp;
     win_T      *wp = NULL, *wparg = NULL;
     dict_T     *d;
     short      tabnr = 0, winnr;
-#endif
 
     if (rettv_list_alloc(rettv) != OK)
        return;
 
-#ifdef FEAT_WINDOWS
     if (argvars[0].v_type != VAR_UNKNOWN)
     {
        wparg = win_id2wp(argvars);
@@ -5308,7 +5288,6 @@ f_getwininfo(typval_T *argvars, typval_T *rettv)
                return;
        }
     }
-#endif
 }
 
 /*
@@ -5978,9 +5957,7 @@ f_has(typval_T *argvars, typval_T *rettv)
 #ifdef FEAT_VIMINFO
        "viminfo",
 #endif
-#ifdef FEAT_WINDOWS
        "vertsplit",
-#endif
 #ifdef FEAT_VIRTUALEDIT
        "virtualedit",
 #endif
@@ -5997,9 +5974,7 @@ f_has(typval_T *argvars, typval_T *rettv)
 #ifdef FEAT_WILDMENU
        "wildmenu",
 #endif
-#ifdef FEAT_WINDOWS
        "windows",
-#endif
 #ifdef FEAT_WAK
        "winaltkeys",
 #endif
@@ -10526,10 +10501,8 @@ free_lstval:
     static void
 f_settabvar(typval_T *argvars, typval_T *rettv)
 {
-#ifdef FEAT_WINDOWS
     tabpage_T  *save_curtab;
     tabpage_T  *tp;
-#endif
     char_u     *varname, *tabvarname;
     typval_T   *varp;
 
@@ -10538,22 +10511,14 @@ f_settabvar(typval_T *argvars, typval_T *rettv)
     if (check_restricted() || check_secure())
        return;
 
-#ifdef FEAT_WINDOWS
     tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
-#endif
     varname = get_tv_string_chk(&argvars[1]);
     varp = &argvars[2];
 
-    if (varname != NULL && varp != NULL
-#ifdef FEAT_WINDOWS
-           && tp != NULL
-#endif
-           )
+    if (varname != NULL && varp != NULL && tp != NULL)
     {
-#ifdef FEAT_WINDOWS
        save_curtab = curtab;
        goto_tabpage_tp(tp, FALSE, FALSE);
-#endif
 
        tabvarname = alloc((unsigned)STRLEN(varname) + 3);
        if (tabvarname != NULL)
@@ -10564,11 +10529,9 @@ f_settabvar(typval_T *argvars, typval_T *rettv)
            vim_free(tabvarname);
        }
 
-#ifdef FEAT_WINDOWS
        /* Restore current tabpage */
        if (valid_tabpage(save_curtab))
            goto_tabpage_tp(save_curtab, FALSE, FALSE);
-#endif
     }
 }
 
@@ -12274,7 +12237,6 @@ f_systemlist(typval_T *argvars, typval_T *rettv)
     static void
 f_tabpagebuflist(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
 {
-#ifdef FEAT_WINDOWS
     tabpage_T  *tp;
     win_T      *wp = NULL;
 
@@ -12293,7 +12255,6 @@ f_tabpagebuflist(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
                                                wp->w_buffer->b_fnum) == FAIL)
                break;
     }
-#endif
 }
 
 
@@ -12304,7 +12265,6 @@ f_tabpagebuflist(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
 f_tabpagenr(typval_T *argvars UNUSED, typval_T *rettv)
 {
     int                nr = 1;
-#ifdef FEAT_WINDOWS
     char_u     *arg;
 
     if (argvars[0].v_type != VAR_UNKNOWN)
@@ -12321,12 +12281,10 @@ f_tabpagenr(typval_T *argvars UNUSED, typval_T *rettv)
     }
     else
        nr = tabpage_index(curtab);
-#endif
     rettv->vval.v_number = nr;
 }
 
 
-#ifdef FEAT_WINDOWS
 static int get_winnr(tabpage_T *tp, typval_T *argvar);
 
 /*
@@ -12375,7 +12333,6 @@ get_winnr(tabpage_T *tp, typval_T *argvar)
        }
     return nr;
 }
-#endif
 
 /*
  * "tabpagewinnr()" function
@@ -12384,7 +12341,6 @@ get_winnr(tabpage_T *tp, typval_T *argvar)
 f_tabpagewinnr(typval_T *argvars UNUSED, typval_T *rettv)
 {
     int                nr = 1;
-#ifdef FEAT_WINDOWS
     tabpage_T  *tp;
 
     tp = find_tabpage((int)get_tv_number(&argvars[0]));
@@ -12392,7 +12348,6 @@ f_tabpagewinnr(typval_T *argvars UNUSED, typval_T *rettv)
        nr = 0;
     else
        nr = get_winnr(tp, &argvars[1]);
-#endif
     rettv->vval.v_number = nr;
 }
 
@@ -13211,9 +13166,7 @@ f_winnr(typval_T *argvars UNUSED, typval_T *rettv)
 {
     int                nr = 1;
 
-#ifdef FEAT_WINDOWS
     nr = get_winnr(curtab, &argvars[0]);
-#endif
     rettv->vval.v_number = nr;
 }
 
@@ -13223,7 +13176,6 @@ f_winnr(typval_T *argvars UNUSED, typval_T *rettv)
     static void
 f_winrestcmd(typval_T *argvars UNUSED, typval_T *rettv)
 {
-#ifdef FEAT_WINDOWS
     win_T      *wp;
     int                winnr = 1;
     garray_T   ga;
@@ -13241,9 +13193,6 @@ f_winrestcmd(typval_T *argvars UNUSED, typval_T *rettv)
     ga_append(&ga, NUL);
 
     rettv->vval.v_string = ga.ga_data;
-#else
-    rettv->vval.v_string = NULL;
-#endif
     rettv->v_type = VAR_STRING;
 }
 
@@ -13287,9 +13236,7 @@ f_winrestview(typval_T *argvars, typval_T *rettv UNUSED)
 
        check_cursor();
        win_new_height(curwin, curwin->w_height);
-# ifdef FEAT_WINDOWS
        win_new_width(curwin, W_WIDTH(curwin));
-# endif
        changed_window_setting();
 
        if (curwin->w_topline <= 0)
@@ -13342,11 +13289,7 @@ f_winwidth(typval_T *argvars, typval_T *rettv)
     if (wp == NULL)
        rettv->vval.v_number = -1;
     else
-#ifdef FEAT_WINDOWS
        rettv->vval.v_number = wp->w_width;
-#else
-       rettv->vval.v_number = Columns;
-#endif
 }
 
 /*
index 1cb15f204735a1b734c37418432e20273c23b759..143ea55e4294dc620f86d0b82fe1056ce9add861 100644 (file)
@@ -3225,9 +3225,7 @@ do_write(exarg_T *eap)
            if (retval == OK)
            {
                curbuf->b_p_ro = FALSE;
-#ifdef FEAT_WINDOWS
                redraw_tabline = TRUE;
-#endif
            }
        }
 
@@ -4153,7 +4151,6 @@ do_ecmd(
 #ifdef FEAT_FOLDING
        /* It's possible that all lines in the buffer changed.  Need to update
         * automatic folding for all windows where it's used. */
-# ifdef FEAT_WINDOWS
        {
            win_T           *win;
            tabpage_T       *tp;
@@ -4162,9 +4159,6 @@ do_ecmd(
                if (win->w_buffer == curbuf)
                    foldUpdateAll(win);
        }
-# else
-       foldUpdateAll(curwin);
-# endif
 #endif
 
        /* Change directories when the 'acd' option is set. */
@@ -4284,10 +4278,8 @@ do_ecmd(
        }
     }
 
-#ifdef FEAT_WINDOWS
     /* Check if cursors in other windows on the same buffer are still valid */
     check_lnums(FALSE);
-#endif
 
     /*
      * Did not read the file, need to show some info about the file.
@@ -4583,10 +4575,8 @@ ex_z(exarg_T *eap)
      * 'scroll' */
     if (eap->forceit)
        bigness = curwin->w_height;
-#ifdef FEAT_WINDOWS
     else if (!ONE_WINDOW)
        bigness = curwin->w_height - 3;
-#endif
     else
        bigness = curwin->w_p_scr * 2;
     if (bigness < 1)
@@ -6152,7 +6142,7 @@ free_old_sub(void)
 }
 #endif
 
-#if (defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)) || defined(PROTO)
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
 /*
  * Set up for a tagpreview.
  * Return TRUE when it was created.
@@ -6215,9 +6205,7 @@ ex_help(exarg_T *eap)
     FILE       *helpfd;        /* file descriptor of help file */
     int                n;
     int                i;
-#ifdef FEAT_WINDOWS
     win_T      *wp;
-#endif
     int                num_matches;
     char_u     **matches;
     char_u     *p;
@@ -6319,13 +6307,8 @@ ex_help(exarg_T *eap)
      * Re-use an existing help window or open a new one.
      * Always open a new one for ":tab help".
      */
-    if (!bt_help(curwin->w_buffer)
-#ifdef FEAT_WINDOWS
-           || cmdmod.tab != 0
-#endif
-           )
+    if (!bt_help(curwin->w_buffer) || cmdmod.tab != 0)
     {
-#ifdef FEAT_WINDOWS
        if (cmdmod.tab != 0)
            wp = NULL;
        else
@@ -6335,7 +6318,6 @@ ex_help(exarg_T *eap)
        if (wp != NULL && wp->w_buffer->b_nwindows > 0)
            win_enter(wp, TRUE);
        else
-#endif
        {
            /*
             * There is no help window yet.
@@ -6348,7 +6330,6 @@ ex_help(exarg_T *eap)
            }
            fclose(helpfd);
 
-#ifdef FEAT_WINDOWS
            /* Split off help window; put it at far top if no position
             * specified, the current window is vertically split and
             * narrow. */
@@ -6358,16 +6339,9 @@ ex_help(exarg_T *eap)
                n |= WSP_TOP;
            if (win_split(0, n) == FAIL)
                goto erret;
-#else
-           /* use current window */
-           if (!can_abandon(curbuf, FALSE))
-               goto erret;
-#endif
 
-#ifdef FEAT_WINDOWS
            if (curwin->w_height < p_hh)
                win_setheight((int)p_hh);
-#endif
 
            /*
             * Open help file (do_ecmd() will set b_help flag, readfile() will
@@ -6377,12 +6351,7 @@ ex_help(exarg_T *eap)
            alt_fnum = curbuf->b_fnum;
            (void)do_ecmd(0, NULL, NULL, NULL, ECMD_LASTL,
                          ECMD_HIDE + ECMD_SET_HELP,
-#ifdef FEAT_WINDOWS
-                         NULL  /* buffer is still open, don't store info */
-#else
-                         curwin
-#endif
-                   );
+                         NULL);  /* buffer is still open, don't store info */
            if (!cmdmod.keepalt)
                curwin->w_alt_fnum = alt_fnum;
            empty_fnum = curbuf->b_fnum;
@@ -6425,7 +6394,6 @@ erret:
     void
 ex_helpclose(exarg_T *eap UNUSED)
 {
-#if defined(FEAT_WINDOWS)
     win_T *win;
 
     FOR_ALL_WINDOWS(win)
@@ -6436,7 +6404,6 @@ ex_helpclose(exarg_T *eap UNUSED)
            return;
        }
     }
-#endif
 }
 
 #if defined(FEAT_MULTI_LANG) || defined(PROTO)
@@ -8350,9 +8317,7 @@ ex_drop(exarg_T *eap)
     int                split = FALSE;
     win_T      *wp;
     buf_T      *buf;
-# ifdef FEAT_WINDOWS
     tabpage_T  *tp;
-# endif
 
     /*
      * Check if the first argument is already being edited in a window.  If
@@ -8372,7 +8337,6 @@ ex_drop(exarg_T *eap)
     if (ARGCOUNT == 0)
        return;
 
-# ifdef FEAT_WINDOWS
     if (cmdmod.tab)
     {
        /* ":tab drop file ...": open a tab for each argument that isn't
@@ -8381,7 +8345,6 @@ ex_drop(exarg_T *eap)
        ex_all(eap);
     }
     else
-# endif
     {
        /* ":drop file ...": Edit the first argument.  Jump to an existing
         * window if possible, edit in current window if the current buffer
@@ -8392,9 +8355,7 @@ ex_drop(exarg_T *eap)
        {
            if (wp->w_buffer == buf)
            {
-# ifdef FEAT_WINDOWS
                goto_tabpage_win(tp, wp);
-# endif
                curwin->w_arg_idx = 0;
                return;
            }
@@ -8408,16 +8369,9 @@ ex_drop(exarg_T *eap)
         */
        if (!buf_hide(curbuf))
        {
-# ifdef FEAT_WINDOWS
            ++emsg_off;
-# endif
            split = check_changed(curbuf, CCGD_AW | CCGD_EXCMD);
-# ifdef FEAT_WINDOWS
            --emsg_off;
-# else
-           if (split)
-               return;
-# endif
        }
 
        /* Fake a ":sfirst" or ":first" command edit the first argument. */
index f0a2a518d5cf3effc6f68a00a864c0c1ef20558e..2b07352df34d94d4a3410fcd3fe8548f078783ac 100644 (file)
@@ -2123,10 +2123,8 @@ check_changed_any(
     int                bufnum = 0;
     int                bufcount = 0;
     int                *bufnrs;
-#ifdef FEAT_WINDOWS
     tabpage_T   *tp;
     win_T      *wp;
-#endif
 
     FOR_ALL_BUFFERS(buf)
        ++bufcount;
@@ -2140,7 +2138,6 @@ check_changed_any(
 
     /* curbuf */
     bufnrs[bufnum++] = curbuf->b_fnum;
-#ifdef FEAT_WINDOWS
     /* buf in curtab */
     FOR_ALL_WINDOWS(wp)
        if (wp->w_buffer != curbuf)
@@ -2151,7 +2148,6 @@ check_changed_any(
        if (tp != curtab)
            for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next)
                add_bufnum(bufnrs, &bufnum, wp->w_buffer->b_fnum);
-#endif
     /* any other buf */
     FOR_ALL_BUFFERS(buf)
        add_bufnum(bufnrs, &bufnum, buf->b_fnum);
@@ -2214,29 +2210,27 @@ check_changed_any(
        }
     }
 
-#ifdef FEAT_WINDOWS
     /* Try to find a window that contains the buffer. */
     if (buf != curbuf)
        FOR_ALL_TAB_WINDOWS(tp, wp)
            if (wp->w_buffer == buf)
            {
-# ifdef FEAT_AUTOCMD
+#ifdef FEAT_AUTOCMD
                bufref_T bufref;
 
                set_bufref(&bufref, buf);
-# endif
+#endif
                goto_tabpage_win(tp, wp);
-# ifdef FEAT_AUTOCMD
+#ifdef FEAT_AUTOCMD
                /* Paranoia: did autocms wipe out the buffer with changes? */
                if (!bufref_valid(&bufref))
                {
                    goto theend;
                }
-# endif
+#endif
                goto buf_found;
            }
 buf_found:
-#endif
 
     /* Open the changed buffer in the current window. */
     if (buf != curbuf)
@@ -2528,16 +2522,12 @@ do_arglist(
     static void
 alist_check_arg_idx(void)
 {
-#ifdef FEAT_WINDOWS
     win_T      *win;
     tabpage_T  *tp;
 
     FOR_ALL_TAB_WINDOWS(tp, win)
        if (win->w_alist == curwin->w_alist)
            check_arg_idx(win);
-#else
-    check_arg_idx(curwin);
-#endif
 }
 
 /*
@@ -2569,9 +2559,7 @@ check_arg_idx(win_T *win)
        win->w_arg_idx_invalid = TRUE;
        if (win->w_arg_idx != WARGCOUNT(win) - 1
                && arg_had_last == FALSE
-#ifdef FEAT_WINDOWS
                && ALIST(win) == &global_alist
-#endif
                && GARGCOUNT > 0
                && win->w_arg_idx < GARGCOUNT
                && (win->w_buffer->b_fnum == GARGLIST[GARGCOUNT - 1].ae_fnum
@@ -2586,10 +2574,7 @@ check_arg_idx(win_T *win)
         * Set "arg_had_last" if it's also the last one */
        win->w_arg_idx_invalid = FALSE;
        if (win->w_arg_idx == WARGCOUNT(win) - 1
-#ifdef FEAT_WINDOWS
-               && win->w_alist == &global_alist
-#endif
-               )
+                                             && win->w_alist == &global_alist)
            arg_had_last = TRUE;
     }
 }
@@ -2604,7 +2589,7 @@ ex_args(exarg_T *eap)
 
     if (eap->cmdidx != CMD_args)
     {
-#if defined(FEAT_WINDOWS) && defined(FEAT_LISTCMDS)
+#if defined(FEAT_LISTCMDS)
        alist_unlink(ALIST(curwin));
        if (eap->cmdidx == CMD_argglobal)
            ALIST(curwin) = &global_alist;
@@ -2625,7 +2610,7 @@ ex_args(exarg_T *eap)
        ex_next(eap);
     }
     else
-#if defined(FEAT_WINDOWS) && defined(FEAT_LISTCMDS)
+#if defined(FEAT_LISTCMDS)
        if (eap->cmdidx == CMD_args)
 #endif
     {
@@ -2648,7 +2633,7 @@ ex_args(exarg_T *eap)
            }
        }
     }
-#if defined(FEAT_WINDOWS) && defined(FEAT_LISTCMDS)
+#if defined(FEAT_LISTCMDS)
     else if (eap->cmdidx == CMD_arglocal)
     {
        garray_T        *gap = &curwin->w_alist->al_ga;
@@ -2742,7 +2727,6 @@ do_argfile(exarg_T *eap, int argn)
        need_mouse_correct = TRUE;
 #endif
 
-#ifdef FEAT_WINDOWS
        /* split window or create new tab page first */
        if (*eap->cmd == 's' || cmdmod.tab != 0)
        {
@@ -2751,7 +2735,6 @@ do_argfile(exarg_T *eap, int argn)
            RESET_BINDING(curwin);
        }
        else
-#endif
        {
            /*
             * if 'hidden' set, only check for changed file when re-editing
@@ -2773,11 +2756,7 @@ do_argfile(exarg_T *eap, int argn)
        }
 
        curwin->w_arg_idx = argn;
-       if (argn == ARGCOUNT - 1
-#ifdef FEAT_WINDOWS
-               && curwin->w_alist == &global_alist
-#endif
-          )
+       if (argn == ARGCOUNT - 1 && curwin->w_alist == &global_alist)
            arg_had_last = TRUE;
 
        /* Edit the file; always use the last known line number.
@@ -2917,10 +2896,8 @@ ex_argdelete(exarg_T *eap)
 ex_listdo(exarg_T *eap)
 {
     int                i;
-#ifdef FEAT_WINDOWS
     win_T      *wp;
     tabpage_T  *tp;
-#endif
     buf_T      *buf = curbuf;
     int                next_fnum = 0;
 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
@@ -2932,14 +2909,6 @@ ex_listdo(exarg_T *eap)
     int                qf_idx;
 #endif
 
-#ifndef FEAT_WINDOWS
-    if (eap->cmdidx == CMD_windo)
-    {
-       ex_ni(eap);
-       return;
-    }
-#endif
-
 #ifndef FEAT_QUICKFIX
     if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo ||
            eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
@@ -2968,13 +2937,10 @@ ex_listdo(exarg_T *eap)
     {
        i = 0;
        /* start at the eap->line1 argument/window/buffer */
-#ifdef FEAT_WINDOWS
        wp = firstwin;
        tp = first_tabpage;
-#endif
        switch (eap->cmdidx)
        {
-#ifdef FEAT_WINDOWS
            case CMD_windo:
                for ( ; wp != NULL && i + 1 < eap->line1; wp = wp->w_next)
                    i++;
@@ -2983,7 +2949,6 @@ ex_listdo(exarg_T *eap)
                for( ; tp != NULL && i + 1 < eap->line1; tp = tp->tp_next)
                    i++;
                break;
-#endif
            case CMD_argdo:
                i = eap->line1 - 1;
                break;
@@ -3049,7 +3014,6 @@ ex_listdo(exarg_T *eap)
                if (curwin->w_arg_idx != i)
                    break;
            }
-#ifdef FEAT_WINDOWS
            else if (eap->cmdidx == CMD_windo)
            {
                /* go to window "wp" */
@@ -3068,7 +3032,6 @@ ex_listdo(exarg_T *eap)
                goto_tabpage_tp(tp, TRUE, TRUE);
                tp = tp->tp_next;
            }
-#endif
            else if (eap->cmdidx == CMD_bufdo)
            {
                /* Remember the number of the next listed buffer, in case
@@ -3140,11 +3103,9 @@ ex_listdo(exarg_T *eap)
 #endif
            }
 
-#ifdef FEAT_WINDOWS
            if (eap->cmdidx == CMD_windo || eap->cmdidx == CMD_tabdo)
                if (i+1 > eap->line2)
                    break;
-#endif
            if (eap->cmdidx == CMD_argdo && i >= eap->line2)
                break;
        }
index e804e2a5db52d0ba5c87b6880e8e626637ef9e81..dbdd4034a9839cebdd6dd1f8ae5a1bb551f2a29a 100644 (file)
@@ -108,7 +108,7 @@ static void ex_blast(exarg_T *eap);
 # define buflist_list          ex_ni
 # define ex_checktime          ex_ni
 #endif
-#if !defined(FEAT_LISTCMDS) || !defined(FEAT_WINDOWS)
+#if !defined(FEAT_LISTCMDS)
 # define ex_buffer_all         ex_ni
 #endif
 static char_u  *getargcmd(char_u **);
@@ -126,7 +126,7 @@ static int  getargopt(exarg_T *eap);
 # define ex_helpgrep           ex_ni
 # define ex_vimgrep            ex_ni
 #endif
-#if !defined(FEAT_QUICKFIX) || !defined(FEAT_WINDOWS)
+#if !defined(FEAT_QUICKFIX)
 # define ex_cclose             ex_ni
 # define ex_copen              ex_ni
 # define ex_cwindow            ex_ni
@@ -159,7 +159,6 @@ static void ex_colorscheme(exarg_T *eap);
 static void    ex_quit(exarg_T *eap);
 static void    ex_cquit(exarg_T *eap);
 static void    ex_quit_all(exarg_T *eap);
-#ifdef FEAT_WINDOWS
 static void    ex_close(exarg_T *eap);
 static void    ex_win_close(int forceit, win_T *win, tabpage_T *tp);
 static void    ex_only(exarg_T *eap);
@@ -170,20 +169,7 @@ static void        ex_tabonly(exarg_T *eap);
 static void    ex_tabnext(exarg_T *eap);
 static void    ex_tabmove(exarg_T *eap);
 static void    ex_tabs(exarg_T *eap);
-#else
-# define ex_close              ex_ni
-# define ex_only               ex_ni
-# define ex_all                        ex_ni
-# define ex_resize             ex_ni
-# define ex_splitview          ex_ni
-# define ex_stag               ex_ni
-# define ex_tabnext            ex_ni
-# define ex_tabmove            ex_ni
-# define ex_tabs               ex_ni
-# define ex_tabclose           ex_ni
-# define ex_tabonly            ex_ni
-#endif
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
 static void    ex_pclose(exarg_T *eap);
 static void    ex_ptag(exarg_T *eap);
 static void    ex_pedit(exarg_T *eap);
@@ -314,11 +300,7 @@ static void        ex_equal(exarg_T *eap);
 static void    ex_sleep(exarg_T *eap);
 static void    do_exmap(exarg_T *eap, int isabbrev);
 static void    ex_winsize(exarg_T *eap);
-#ifdef FEAT_WINDOWS
 static void    ex_wincmd(exarg_T *eap);
-#else
-# define ex_wincmd         ex_ni
-#endif
 #if defined(FEAT_GUI) || defined(UNIX) || defined(VMS) || defined(MSWIN)
 static void    ex_winpos(exarg_T *eap);
 #else
@@ -356,7 +338,7 @@ static void ex_findpat(exarg_T *eap);
 # define ex_findpat            ex_ni
 # define ex_checkpath          ex_ni
 #endif
-#if defined(FEAT_FIND_ID) && defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_FIND_ID) && defined(FEAT_QUICKFIX)
 static void    ex_psearch(exarg_T *eap);
 #else
 # define ex_psearch            ex_ni
@@ -1675,7 +1657,6 @@ compute_buffer_local_count(int addr_type, int lnum, int offset)
     return buf->b_fnum;
 }
 
-#ifdef FEAT_WINDOWS
 static int current_win_nr(win_T *win);
 static int current_tab_nr(tabpage_T *tab);
 
@@ -1713,13 +1694,6 @@ current_tab_nr(tabpage_T *tab)
 # define LAST_WIN_NR current_win_nr(NULL)
 # define CURRENT_TAB_NR current_tab_nr(curtab)
 # define LAST_TAB_NR current_tab_nr(NULL)
-#else
-# define CURRENT_WIN_NR 1
-# define LAST_WIN_NR 1
-# define CURRENT_TAB_NR 1
-# define LAST_TAB_NR 1
-#endif
-
 
 /*
  * Execute one Ex command.
@@ -1843,16 +1817,12 @@ do_one_cmd(
            /* When adding an entry, also modify cmd_exists(). */
            case 'a':   if (!checkforcmd(&ea.cmd, "aboveleft", 3))
                            break;
-#ifdef FEAT_WINDOWS
                        cmdmod.split |= WSP_ABOVE;
-#endif
                        continue;
 
            case 'b':   if (checkforcmd(&ea.cmd, "belowright", 3))
                        {
-#ifdef FEAT_WINDOWS
                            cmdmod.split |= WSP_BELOW;
-#endif
                            continue;
                        }
                        if (checkforcmd(&ea.cmd, "browse", 3))
@@ -1864,9 +1834,7 @@ do_one_cmd(
                        }
                        if (!checkforcmd(&ea.cmd, "botright", 2))
                            break;
-#ifdef FEAT_WINDOWS
                        cmdmod.split |= WSP_BOT;
-#endif
                        continue;
 
            case 'c':   if (!checkforcmd(&ea.cmd, "confirm", 4))
@@ -1937,9 +1905,7 @@ do_one_cmd(
 
                        if (!checkforcmd(&ea.cmd, "leftabove", 5))
                            break;
-#ifdef FEAT_WINDOWS
                        cmdmod.split |= WSP_ABOVE;
-#endif
                        continue;
 
            case 'n':   if (checkforcmd(&ea.cmd, "noautocmd", 3))
@@ -1963,9 +1929,7 @@ do_one_cmd(
 
            case 'r':   if (!checkforcmd(&ea.cmd, "rightbelow", 6))
                            break;
-#ifdef FEAT_WINDOWS
                        cmdmod.split |= WSP_BELOW;
-#endif
                        continue;
 
            case 's':   if (checkforcmd(&ea.cmd, "sandbox", 3))
@@ -1993,7 +1957,6 @@ do_one_cmd(
 
            case 't':   if (checkforcmd(&p, "tab", 3))
                        {
-#ifdef FEAT_WINDOWS
                            long tabnr = get_address(&ea, &ea.cmd, ADDR_TABS,
                                                            ea.skip, FALSE, 1);
                            if (tabnr == MAXLNUM)
@@ -2008,14 +1971,11 @@ do_one_cmd(
                                cmdmod.tab = tabnr + 1;
                            }
                            ea.cmd = p;
-#endif
                            continue;
                        }
                        if (!checkforcmd(&ea.cmd, "topleft", 2))
                            break;
-#ifdef FEAT_WINDOWS
                        cmdmod.split |= WSP_TOP;
-#endif
                        continue;
 
            case 'u':   if (!checkforcmd(&ea.cmd, "unsilent", 3))
@@ -2027,9 +1987,7 @@ do_one_cmd(
 
            case 'v':   if (checkforcmd(&ea.cmd, "vertical", 4))
                        {
-#ifdef FEAT_WINDOWS
                            cmdmod.split |= WSP_VERT;
-#endif
                            continue;
                        }
                        if (!checkforcmd(&p, "verbose", 4))
@@ -2112,11 +2070,9 @@ do_one_cmd(
        else
            ea.addr_type = ADDR_LINES;
 
-#ifdef FEAT_WINDOWS
        /* :wincmd range depends on the argument. */
        if (ea.cmdidx == CMD_wincmd && p != NULL)
            get_wincmd_addr_type(skipwhite(p), &ea);
-#endif
     }
 
     /* repeat for all ',' or ';' separated addresses */
@@ -6795,7 +6751,6 @@ uc_check_code(
            *buf = '\0';
        }
 
-#ifdef FEAT_WINDOWS
        /* :aboveleft and :leftabove */
        if (cmdmod.split & WSP_ABOVE)
            result += add_cmd_modifier(buf, "aboveleft", &multi_mods);
@@ -6805,7 +6760,6 @@ uc_check_code(
        /* :botright */
        if (cmdmod.split & WSP_BOT)
            result += add_cmd_modifier(buf, "botright", &multi_mods);
-#endif
 
        /* the modifiers that are simple flags */
        for (i = 0; mod_entries[i].varp != NULL; ++i)
@@ -6821,23 +6775,19 @@ uc_check_code(
        if (msg_silent > 0)
            result += add_cmd_modifier(buf,
                    emsg_silent > 0 ? "silent!" : "silent", &multi_mods);
-#ifdef FEAT_WINDOWS
        /* :tab */
        if (cmdmod.tab > 0)
            result += add_cmd_modifier(buf, "tab", &multi_mods);
        /* :topleft */
        if (cmdmod.split & WSP_TOP)
            result += add_cmd_modifier(buf, "topleft", &multi_mods);
-#endif
        /* TODO: How to support :unsilent?*/
        /* :verbose */
        if (p_verbose > 0)
            result += add_cmd_modifier(buf, "verbose", &multi_mods);
-#ifdef FEAT_WINDOWS
        /* :vertical */
        if (cmdmod.split & WSP_VERT)
            result += add_cmd_modifier(buf, "vertical", &multi_mods);
-#endif
        if (quote && buf != NULL)
        {
            buf += result - 2;
@@ -7270,9 +7220,7 @@ not_exiting(void)
     static void
 ex_quit(exarg_T *eap)
 {
-#if defined(FEAT_WINDOWS) || defined(FEAT_AUTOCMD)
     win_T      *wp;
-#endif
 
 #ifdef FEAT_CMDWIN
     if (cmdwin_type != 0)
@@ -7287,7 +7235,6 @@ ex_quit(exarg_T *eap)
        text_locked_msg();
        return;
     }
-#ifdef FEAT_WINDOWS
     if (eap->addr_count > 0)
     {
        int     wnr = eap->line2;
@@ -7297,19 +7244,13 @@ ex_quit(exarg_T *eap)
                break;
     }
     else
-#endif
-#if defined(FEAT_WINDOWS) || defined(FEAT_AUTOCMD)
        wp = curwin;
-#endif
 
 #ifdef FEAT_AUTOCMD
     apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
     /* Refuse to quit when locked or when the buffer in the last window is
      * being closed (can only happen in autocommands). */
-    if (curbuf_locked()
-# ifdef FEAT_WINDOWS
-           || !win_valid(wp)
-# endif
+    if (curbuf_locked() || !win_valid(wp)
            || (wp->w_buffer->b_nwindows == 1 && wp->w_buffer->b_locked > 0))
        return;
 #endif
@@ -7334,7 +7275,6 @@ ex_quit(exarg_T *eap)
     }
     else
     {
-#ifdef FEAT_WINDOWS
        /* quit last window
         * Note: only_one_window() returns true, even so a help window is
         * still open. In that case only quit, if no address has been
@@ -7343,15 +7283,12 @@ ex_quit(exarg_T *eap)
         * :h|wincmd w|q      - quit
         */
        if (only_one_window() && (ONE_WINDOW || eap->addr_count == 0))
-#endif
            getout(0);
-#ifdef FEAT_WINDOWS
-# ifdef FEAT_GUI
+#ifdef FEAT_GUI
        need_mouse_correct = TRUE;
-# endif
+#endif
        /* close window; may free buffer */
        win_close(wp, !buf_hide(wp->w_buffer) || eap->forceit);
-#endif
     }
 }
 
@@ -7402,7 +7339,6 @@ ex_quit_all(exarg_T *eap)
     not_exiting();
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * ":close": close current window, unless it is the last one
  */
@@ -7411,11 +7347,11 @@ ex_close(exarg_T *eap)
 {
     win_T      *win;
     int                winnr = 0;
-# ifdef FEAT_CMDWIN
+#ifdef FEAT_CMDWIN
     if (cmdwin_type != 0)
        cmdwin_result = Ctrl_C;
     else
-# endif
+#endif
        if (!text_locked()
 #ifdef FEAT_AUTOCMD
                && !curbuf_locked()
@@ -7438,7 +7374,7 @@ ex_close(exarg_T *eap)
        }
 }
 
-# ifdef FEAT_QUICKFIX
+#ifdef FEAT_QUICKFIX
 /*
  * ":pclose": Close any preview window.
  */
@@ -7454,7 +7390,7 @@ ex_pclose(exarg_T *eap)
            break;
        }
 }
-# endif
+#endif
 
 /*
  * Close window "win" and take care of handling closing the last window for a
@@ -7472,7 +7408,7 @@ ex_win_close(
     need_hide = (bufIsChanged(buf) && buf->b_nwindows <= 1);
     if (need_hide && !buf_hide(buf) && !forceit)
     {
-# if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
        if ((p_confirm || cmdmod.confirm) && p_write)
        {
            bufref_T bufref;
@@ -7484,16 +7420,16 @@ ex_win_close(
            need_hide = FALSE;
        }
        else
-# endif
+#endif
        {
            no_write_message();
            return;
        }
     }
 
-# ifdef FEAT_GUI
+#ifdef FEAT_GUI
     need_mouse_correct = TRUE;
-# endif
+#endif
 
     /* free buffer when not hiding it or when it's a scratch buffer */
     if (tp == NULL)
@@ -7779,18 +7715,16 @@ ex_all(exarg_T *eap)
        eap->line2 = 9999;
     do_arg_all((int)eap->line2, eap->forceit, eap->cmdidx == CMD_drop);
 }
-#endif /* FEAT_WINDOWS */
 
     static void
 ex_hide(exarg_T *eap UNUSED)
 {
     /* ":hide" or ":hide | cmd": hide current window */
-#ifdef FEAT_WINDOWS
     if (!eap->skip)
     {
-# ifdef FEAT_GUI
+#ifdef FEAT_GUI
        need_mouse_correct = TRUE;
-# endif
+#endif
        if (eap->addr_count == 0)
            win_close(curwin, FALSE);   /* don't free buffer */
        else
@@ -7809,7 +7743,6 @@ ex_hide(exarg_T *eap UNUSED)
            win_close(win, FALSE);
        }
     }
-#endif
 }
 
 /*
@@ -7887,17 +7820,13 @@ ex_exit(exarg_T *eap)
     }
     else
     {
-#ifdef FEAT_WINDOWS
        if (only_one_window())      /* quit last window, exit Vim */
-#endif
            getout(0);
-#ifdef FEAT_WINDOWS
 # ifdef FEAT_GUI
        need_mouse_correct = TRUE;
 # endif
        /* Quit current window, may free the buffer. */
        win_close(curwin, !buf_hide(curwin->w_buffer));
-#endif
     }
 }
 
@@ -7947,7 +7876,7 @@ ex_shell(exarg_T *eap UNUSED)
     do_shell(NULL, 0);
 }
 
-#if (defined(FEAT_WINDOWS) && defined(HAVE_DROP_FILE)) \
+#if defined(HAVE_DROP_FILE) \
        || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \
        || defined(FEAT_GUI_MSWIN) \
        || defined(FEAT_GUI_MAC) \
@@ -8000,7 +7929,6 @@ handle_drop(
     }
     if (split)
     {
-# ifdef FEAT_WINDOWS
        if (win_split(0, 0) == FAIL)
            return;
        RESET_BINDING(curwin);
@@ -8009,9 +7937,6 @@ handle_drop(
         * existing one is overwritten. */
        alist_unlink(curwin->w_alist);
        alist_new();
-# else
-       return;     /* can't split, always fail */
-# endif
     }
 
     /*
@@ -8058,8 +7983,6 @@ alist_init(alist_T *al)
     ga_init2(&al->al_ga, (int)sizeof(aentry_T), 5);
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
-
 /*
  * Remove a reference from an argument list.
  * Ignored when the argument list is the global one.
@@ -8075,7 +7998,7 @@ alist_unlink(alist_T *al)
     }
 }
 
-# if defined(FEAT_LISTCMDS) || defined(HAVE_DROP_FILE) || defined(PROTO)
+#if defined(FEAT_LISTCMDS) || defined(HAVE_DROP_FILE) || defined(PROTO)
 /*
  * Create a new argument list and use it for the current window.
  */
@@ -8095,7 +8018,6 @@ alist_new(void)
        alist_init(curwin->w_alist);
     }
 }
-# endif
 #endif
 
 #if !defined(UNIX) || defined(PROTO)
@@ -8179,9 +8101,7 @@ alist_set(
     }
     else
        FreeWild(count, files);
-#ifdef FEAT_WINDOWS
     if (al == &global_alist)
-#endif
        arg_had_last = FALSE;
 }
 
@@ -8215,21 +8135,17 @@ alist_add(
 alist_slash_adjust(void)
 {
     int                i;
-# ifdef FEAT_WINDOWS
     win_T      *wp;
     tabpage_T  *tp;
-# endif
 
     for (i = 0; i < GARGCOUNT; ++i)
        if (GARGLIST[i].ae_fname != NULL)
            slash_adjust(GARGLIST[i].ae_fname);
-# ifdef FEAT_WINDOWS
     FOR_ALL_TAB_WINDOWS(tp, wp)
        if (wp->w_alist != &global_alist)
            for (i = 0; i < WARGCOUNT(wp); ++i)
                if (WARGLIST(wp)[i].ae_fname != NULL)
                    slash_adjust(WARGLIST(wp)[i].ae_fname);
-# endif
 }
 #endif
 
@@ -8271,7 +8187,6 @@ ex_wrongmodifier(exarg_T *eap)
     eap->errmsg = e_invcmd;
 }
 
-#ifdef FEAT_WINDOWS
 /*
  * :sview [+command] file      split window with new file, read-only
  * :split [[+command] file]    split window with current or new file
@@ -8289,18 +8204,18 @@ ex_wrongmodifier(exarg_T *eap)
 ex_splitview(exarg_T *eap)
 {
     win_T      *old_curwin = curwin;
-# if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
+#if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
     char_u     *fname = NULL;
-# endif
-# ifdef FEAT_BROWSE
+#endif
+#ifdef FEAT_BROWSE
     int                browse_flag = cmdmod.browse;
-# endif
+#endif
 
-# ifdef FEAT_GUI
+#ifdef FEAT_GUI
     need_mouse_correct = TRUE;
-# endif
+#endif
 
-# ifdef FEAT_QUICKFIX
+#ifdef FEAT_QUICKFIX
     /* A ":split" in the quickfix window works like ":new".  Don't want two
      * quickfix windows.  But it's OK when doing ":tab split". */
     if (bt_quickfix(curbuf) && cmdmod.tab == 0)
@@ -8310,9 +8225,9 @@ ex_splitview(exarg_T *eap)
        if (eap->cmdidx == CMD_vsplit)
            eap->cmdidx = CMD_vnew;
     }
-# endif
+#endif
 
-# ifdef FEAT_SEARCHPATH
+#ifdef FEAT_SEARCHPATH
     if (eap->cmdidx == CMD_sfind || eap->cmdidx == CMD_tabfind)
     {
        fname = find_file_in_path(eap->arg, (int)STRLEN(eap->arg),
@@ -8321,11 +8236,11 @@ ex_splitview(exarg_T *eap)
            goto theend;
        eap->arg = fname;
     }
-#  ifdef FEAT_BROWSE
+# ifdef FEAT_BROWSE
     else
-#  endif
 # endif
-# ifdef FEAT_BROWSE
+#endif
+#ifdef FEAT_BROWSE
     if (cmdmod.browse
            && eap->cmdidx != CMD_vnew
            && eap->cmdidx != CMD_new)
@@ -8353,7 +8268,7 @@ ex_splitview(exarg_T *eap)
        }
     }
     cmdmod.browse = FALSE;     /* Don't browse again in do_ecmd(). */
-# endif
+#endif
 
     /*
      * Either open new tab page or split the window.
@@ -8534,8 +8449,6 @@ ex_tabs(exarg_T *eap UNUSED)
     }
 }
 
-#endif /* FEAT_WINDOWS */
-
 /*
  * ":mode": Set screen mode.
  * If no argument given, just get the screen size and redraw.
@@ -8549,7 +8462,6 @@ ex_mode(exarg_T *eap)
        mch_screenmode(eap->arg);
 }
 
-#ifdef FEAT_WINDOWS
 /*
  * ":resize".
  * set, increment or decrement current window height
@@ -8588,7 +8500,6 @@ ex_resize(exarg_T *eap)
        win_setheight_win((int)n, wp);
     }
 }
-#endif
 
 /*
  * ":find [+command] <file>" command.
@@ -8681,9 +8592,7 @@ do_exedit(
     win_T      *old_curwin)        /* curwin before doing a split or NULL */
 {
     int                n;
-#ifdef FEAT_WINDOWS
     int                need_hide;
-#endif
     int                exmode_was = exmode_active;
 
     /*
@@ -8738,10 +8647,7 @@ do_exedit(
     if ((eap->cmdidx == CMD_new
                || eap->cmdidx == CMD_tabnew
                || eap->cmdidx == CMD_tabedit
-#ifdef FEAT_WINDOWS
-               || eap->cmdidx == CMD_vnew
-#endif
-               ) && *eap->arg == NUL)
+               || eap->cmdidx == CMD_vnew) && *eap->arg == NUL)
     {
        /* ":new" or ":tabnew" without argument: edit an new empty buffer */
        setpcmark();
@@ -8749,11 +8655,7 @@ do_exedit(
                      ECMD_HIDE + (eap->forceit ? ECMD_FORCEIT : 0),
                      old_curwin == NULL ? curwin : NULL);
     }
-    else if ((eap->cmdidx != CMD_split
-#ifdef FEAT_WINDOWS
-               && eap->cmdidx != CMD_vsplit
-#endif
-               )
+    else if ((eap->cmdidx != CMD_split && eap->cmdidx != CMD_vsplit)
            || *eap->arg != NUL
 #ifdef FEAT_BROWSE
            || cmdmod.browse
@@ -8789,33 +8691,31 @@ do_exedit(
                    , old_curwin == NULL ? curwin : NULL) == FAIL)
        {
            /* Editing the file failed.  If the window was split, close it. */
-#ifdef FEAT_WINDOWS
            if (old_curwin != NULL)
            {
                need_hide = (curbufIsChanged() && curbuf->b_nwindows <= 1);
                if (!need_hide || buf_hide(curbuf))
                {
-# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
                    cleanup_T   cs;
 
                    /* Reset the error/interrupt/exception state here so that
                     * aborting() returns FALSE when closing a window. */
                    enter_cleanup(&cs);
-# endif
-# ifdef FEAT_GUI
+#endif
+#ifdef FEAT_GUI
                    need_mouse_correct = TRUE;
-# endif
+#endif
                    win_close(curwin, !need_hide && !buf_hide(curbuf));
 
-# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
                    /* Restore the error/interrupt/exception state if not
                     * discarded by a new aborting error, interrupt, or
                     * uncaught exception. */
                    leave_cleanup(&cs);
-# endif
+#endif
                }
            }
-#endif
        }
        else if (readonlymode && curbuf->b_nwindows == 1)
        {
@@ -8841,7 +8741,6 @@ do_exedit(
 #endif
     }
 
-#ifdef FEAT_WINDOWS
     /*
      * if ":split file" worked, set alternate file name in old window to new
      * file
@@ -8853,7 +8752,6 @@ do_exedit(
            && old_curwin->w_buffer != curbuf
            && !cmdmod.keepalt)
        old_curwin->w_alt_fnum = curbuf->b_fnum;
-#endif
 
     ex_no_reprint = TRUE;
 }
@@ -8952,9 +8850,7 @@ ex_syncbind(exarg_T *eap UNUSED)
            curwin->w_scbind_pos = topline;
            redraw_later(VALID);
            cursor_correct();
-#ifdef FEAT_WINDOWS
            curwin->w_redr_status = TRUE;
-#endif
        }
     }
     curwin = save_curwin;
@@ -9309,7 +9205,6 @@ ex_winsize(exarg_T *eap)
        EMSG(_("E465: :winsize requires two number arguments"));
 }
 
-#ifdef FEAT_WINDOWS
     static void
 ex_wincmd(exarg_T *eap)
 {
@@ -9344,7 +9239,6 @@ ex_wincmd(exarg_T *eap)
        postponed_split_tab = 0;
     }
 }
-#endif
 
 #if defined(FEAT_GUI) || defined(UNIX) || defined(VMS) || defined(MSWIN)
 /*
@@ -9865,7 +9759,6 @@ ex_redraw(exarg_T *eap)
     static void
 ex_redrawstatus(exarg_T *eap UNUSED)
 {
-#if defined(FEAT_WINDOWS)
     int                r = RedrawingDisabled;
     int                p = p_lz;
 
@@ -9879,7 +9772,6 @@ ex_redrawstatus(exarg_T *eap UNUSED)
     RedrawingDisabled = r;
     p_lz = p;
     out_flush();
-#endif
 }
 
     static void
@@ -10457,7 +10349,7 @@ ex_checkpath(exarg_T *eap)
                                              (linenr_T)1, (linenr_T)MAXLNUM);
 }
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
 /*
  * ":psearch"
  */
@@ -10528,9 +10420,8 @@ ex_findpat(exarg_T *eap)
 }
 #endif
 
-#ifdef FEAT_WINDOWS
 
-# ifdef FEAT_QUICKFIX
+#ifdef FEAT_QUICKFIX
 /*
  * ":ptag", ":ptselect", ":ptjump", ":ptnext", etc.
  */
@@ -10563,7 +10454,7 @@ ex_pedit(exarg_T *eap)
     }
     g_do_tagpreview = 0;
 }
-# endif
+#endif
 
 /*
  * ":stag", ":stselect" and ":stjump".
@@ -10578,7 +10469,6 @@ ex_stag(exarg_T *eap)
     postponed_split_flags = 0;
     postponed_split_tab = 0;
 }
-#endif
 
 /*
  * ":tag", ":tselect", ":tjump", ":tnext", etc.
index d0f2bfe1d6f1374a6924ee85bfc619baa4a544e0..becfa007278f821390da76922b383ec1837a7e3f 100644 (file)
@@ -1125,7 +1125,7 @@ getcmdline(
 #ifdef CURSOR_SHAPE
                ui_cursor_shape();      /* may show different cursor shape */
 #endif
-#if defined(FEAT_WINDOWS) && defined(FEAT_KEYMAP)
+#if defined(FEAT_KEYMAP)
                /* Show/unshow value of 'keymap' in status lines later. */
                status_redraw_curbuf();
 #endif
@@ -1966,11 +1966,9 @@ cmdline_changed:
                end_pos = curwin->w_cursor; /* shutup gcc 4 */
 
            validate_cursor();
-# ifdef FEAT_WINDOWS
            /* May redraw the status line to show the cursor position. */
            if (p_ru && curwin->w_status_height > 0)
                curwin->w_redr_status = TRUE;
-# endif
 
            save_cmdline(&save_ccline);
            update_screen(SOME_VALID);
index b7f366426633edb37682fb81e7355be54c2e9521..37e4d31270c36deff9935044682c5c49353c02b3 100644 (file)
  */
 
 /*
+ * These features used to be optional but are now always enabled.
  * +windows            Multiple windows.  Without this there is no help
  *                     window and no status lines.
  * +vertsplit          Vertically split windows.
  */
-#ifdef FEAT_SMALL
-# define FEAT_WINDOWS
-#endif
 
 /*
  * +listcmds           Vim commands for the buffer list and the argument
 # define FEAT_JUMPLIST
 #endif
 
-/* the cmdline-window requires FEAT_WINDOWS and FEAT_CMDHIST */
-#if defined(FEAT_WINDOWS) && defined(FEAT_CMDHIST)
+/* the cmdline-window requires FEAT_CMDHIST */
+#if defined(FEAT_CMDHIST)
 # define FEAT_CMDWIN
 #endif
 
  * +diff               Displaying diffs in a nice way.
  *                     Requires +windows and +autocmd.
  */
-#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) && defined(FEAT_AUTOCMD)
+#if defined(FEAT_NORMAL) && defined(FEAT_AUTOCMD)
 # define FEAT_DIFF
 #endif
 
 /*
  * +wildmenu           'wildmenu' option
  */
-#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS)
+#if defined(FEAT_NORMAL)
 # define FEAT_WILDMENU
 #endif
 
  * +mksession          ":mksession" command.
  *                     Requires +windows and +vertsplit.
  */
-#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS)
+#if defined(FEAT_NORMAL)
 # define FEAT_SESSION
 #endif
 
 /*
  * +scrollbind         synchronization of split windows
  */
-#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS)
+#if defined(FEAT_NORMAL)
 # define FEAT_SCROLLBIND
 #endif
 
 /*
  * +cursorbind         synchronization of split windows
  */
-#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS)
+#if defined(FEAT_NORMAL)
 # define FEAT_CURSORBIND
 #endif
 
 /*
  * GUI tabline
  */
-#if defined(FEAT_WINDOWS) && defined(FEAT_NORMAL) \
+#if defined(FEAT_NORMAL) \
     && (defined(FEAT_GUI_GTK) \
        || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
        || defined(FEAT_GUI_MAC) \
index 87a46b1b8fce886d884f606baf7281a47094d67e..0d1ac2d078d302c655495a6b1a1c6d5c24edc44d 100644 (file)
@@ -4174,9 +4174,7 @@ buf_write(
 #ifdef FEAT_TITLE
        need_maketitle = TRUE;      /* set window title later */
 #endif
-#ifdef FEAT_WINDOWS
        status_redraw_all();        /* redraw status lines later */
-#endif
     }
 
     if (end > buf->b_ml.ml_line_count)
@@ -6197,10 +6195,8 @@ shorten_fnames(int force)
         * also have a swap file. */
        mf_fullname(buf->b_ml.ml_mfp);
     }
-#ifdef FEAT_WINDOWS
     status_redraw_all();
     redraw_tabline = TRUE;
-#endif
 }
 
 #if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
@@ -8963,9 +8959,7 @@ aucmd_prepbuf(
     buf_T      *buf)           /* new curbuf */
 {
     win_T      *win;
-#ifdef FEAT_WINDOWS
     int                save_ea;
-#endif
 #ifdef FEAT_AUTOCHDIR
     int                save_acd;
 #endif
@@ -8974,13 +8968,9 @@ aucmd_prepbuf(
     if (buf == curbuf)         /* be quick when buf is curbuf */
        win = curwin;
     else
-#ifdef FEAT_WINDOWS
        FOR_ALL_WINDOWS(win)
            if (win->w_buffer == buf)
                break;
-#else
-       win = NULL;
-#endif
 
     /* Allocate "aucmd_win" when needed.  If this fails (out of memory) fall
      * back to using the current window. */
@@ -9026,7 +9016,6 @@ aucmd_prepbuf(
        globaldir = NULL;
 
 
-#ifdef FEAT_WINDOWS
        /* Split the current window, put the aucmd_win in the upper half.
         * We don't want the BufEnter or WinEnter autocommands. */
        block_autocmds();
@@ -9034,20 +9023,19 @@ aucmd_prepbuf(
        save_ea = p_ea;
        p_ea = FALSE;
 
-# ifdef FEAT_AUTOCHDIR
+#ifdef FEAT_AUTOCHDIR
        /* Prevent chdir() call in win_enter_ext(), through do_autochdir(). */
        save_acd = p_acd;
        p_acd = FALSE;
-# endif
+#endif
 
        (void)win_split_ins(0, WSP_TOP, aucmd_win, 0);
        (void)win_comp_pos();   /* recompute window positions */
        p_ea = save_ea;
-# ifdef FEAT_AUTOCHDIR
+#ifdef FEAT_AUTOCHDIR
        p_acd = save_acd;
-# endif
-       unblock_autocmds();
 #endif
+       unblock_autocmds();
        curwin = aucmd_win;
     }
     curbuf = buf;
@@ -9064,14 +9052,11 @@ aucmd_prepbuf(
 aucmd_restbuf(
     aco_save_T *aco)           /* structure holding saved values */
 {
-#ifdef FEAT_WINDOWS
     int dummy;
-#endif
 
     if (aco->use_aucmd_win)
     {
        --curbuf->b_nwindows;
-#ifdef FEAT_WINDOWS
        /* Find "aucmd_win", it can't be closed, but it may be in another tab
         * page. Do not trigger autocommands here. */
        block_autocmds();
@@ -9112,12 +9097,9 @@ win_found:
        else
            /* Hmm, original window disappeared.  Just use the first one. */
            curwin = firstwin;
-# ifdef FEAT_EVAL
+#ifdef FEAT_EVAL
        vars_clear(&aucmd_win->w_vars->dv_hashtab);  /* free all w: variables */
        hash_init(&aucmd_win->w_vars->dv_hashtab);   /* re-use the hashtab */
-# endif
-#else
-       curwin = aco->save_curwin;
 #endif
        curbuf = curwin->w_buffer;
 
@@ -9143,9 +9125,7 @@ win_found:
     else
     {
        /* restore curwin */
-#ifdef FEAT_WINDOWS
        if (win_valid(aco->save_curwin))
-#endif
        {
            /* Restore the buffer which was previously edited by curwin, if
             * it was changed, we are still the same window and the buffer is
index f8abe22d72f49a330b893672e9c0697608af13c9..bc79accb66aa097ef16bd71100b4df74ebd1fd68 100644 (file)
@@ -95,7 +95,7 @@ static int foldendmarkerlen;
 
 /* Exported folding functions. {{{1 */
 /* copyFoldingState() {{{2 */
-#if defined(FEAT_WINDOWS) || defined(PROTO)
+
 /*
  * Copy that folding state from window "wp_from" to window "wp_to".
  */
@@ -106,7 +106,6 @@ copyFoldingState(win_T *wp_from, win_T *wp_to)
     wp_to->w_foldinvalid = wp_from->w_foldinvalid;
     cloneFoldGrowArray(&wp_from->w_folds, &wp_to->w_folds);
 }
-#endif
 
 /* hasAnyFolding() {{{2 */
 /*
index f22242769e6204ddf44d9663b5bfa5b1859964df..179b2f3e0e010f98dfd64be6cd9f5d53c616de6f 100644 (file)
@@ -2290,10 +2290,8 @@ vgetorpeek(int advance)
                                msg_row = Rows - 1;
                                msg_clr_eos();          /* clear ruler */
                            }
-#ifdef FEAT_WINDOWS
                            status_redraw_all();
                            redraw_statuslines();
-#endif
                            showmode();
                            setcursor();
                            continue;
index ac2727f7c802494cb30c541cfa183062b4768eb1..71d3433f59ffee9b669b9455155ba78bb38adee4 100644 (file)
@@ -63,7 +63,6 @@ EXTERN int    Screen_mco INIT(= 0);           /* value of p_mco used when
 EXTERN schar_T *ScreenLines2 INIT(= NULL);
 #endif
 
-#ifdef FEAT_WINDOWS
 /*
  * Indexes for tab page line:
  *     N > 0 for label of tab page N
@@ -72,7 +71,6 @@ EXTERN schar_T        *ScreenLines2 INIT(= NULL);
  *     N == -999 for closing current tab page
  */
 EXTERN short   *TabPageIdxs INIT(= NULL);
-#endif
 
 EXTERN int     screen_Rows INIT(= 0);      /* actual size of ScreenLines[] */
 EXTERN int     screen_Columns INIT(= 0);   /* actual size of ScreenLines[] */
@@ -440,9 +438,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_WINDOWS
 EXTERN int     drag_sep_line INIT(= FALSE);    /* dragging vert separator */
-#  endif
 # endif
 
 #endif
@@ -550,9 +546,7 @@ EXTERN int  clip_unnamed_saved INIT(= 0);
  * All windows are linked in a list. firstwin points to the first entry,
  * lastwin to the last entry (can be the same as firstwin) and curwin to the
  * currently active window.
- * Without the FEAT_WINDOWS they are all equal.
  */
-#ifdef FEAT_WINDOWS
 EXTERN win_T   *firstwin;              /* first window */
 EXTERN win_T   *lastwin;               /* last window */
 EXTERN win_T   *prevwin INIT(= NULL);  /* previous window */
@@ -571,16 +565,6 @@ EXTERN win_T       *prevwin INIT(= NULL);  /* previous window */
     for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
        for ((wp) = ((tp) == curtab) \
                ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
-#else
-# define firstwin curwin
-# define lastwin curwin
-# define ONE_WINDOW 1
-# define W_NEXT(wp) NULL
-# define FOR_ALL_WINDOWS(wp) wp = curwin;
-# define FOR_ALL_TABPAGES(tp) for (;FALSE;)
-# define FOR_ALL_WINDOWS_IN_TAB(tp, wp) wp = curwin;
-# define FOR_ALL_TAB_WINDOWS(tp, wp) wp = curwin;
-#endif
 
 EXTERN win_T   *curwin;        /* currently active window */
 
@@ -595,7 +579,6 @@ EXTERN int  aucmd_win_used INIT(= FALSE);   /* aucmd_win is being used */
  */
 EXTERN frame_T *topframe;      /* top of the window frame tree */
 
-#ifdef FEAT_WINDOWS
 /*
  * Tab pages are alternative topframes.  "first_tabpage" points to the first
  * one in the list, "curtab" is the current one.
@@ -603,7 +586,6 @@ EXTERN frame_T      *topframe;      /* top of the window frame tree */
 EXTERN tabpage_T    *first_tabpage;
 EXTERN tabpage_T    *curtab;
 EXTERN int         redraw_tabline INIT(= FALSE);  /* need to redraw tabline */
-#endif
 
 /*
  * All buffers are linked in a list. 'firstbuf' points to the first entry,
@@ -1101,14 +1083,12 @@ EXTERN varnumber_T last_changedtick INIT(= 0);   /* for TextChanged event */
 EXTERN buf_T   *last_changedtick_buf INIT(= NULL);
 #endif
 
-#ifdef FEAT_WINDOWS
 EXTERN int     postponed_split INIT(= 0);  /* for CTRL-W CTRL-] command */
 EXTERN int     postponed_split_flags INIT(= 0);  /* args for win_split() */
 EXTERN int     postponed_split_tab INIT(= 0);  /* cmdmod.tab */
-# ifdef FEAT_QUICKFIX
+#ifdef FEAT_QUICKFIX
 EXTERN int     g_do_tagpreview INIT(= 0);  /* for tag preview commands:
                                               height of preview window */
-# endif
 #endif
 EXTERN int     replace_offset INIT(= 0);   /* offset for replace_push() */
 
@@ -1196,17 +1176,12 @@ EXTERN int      lcs_trail INIT(= NUL);
 EXTERN int     lcs_conceal INIT(= ' ');
 #endif
 
-#if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
-       || defined(FEAT_FOLDING)
 /* Characters from 'fillchars' option */
 EXTERN int     fill_stl INIT(= ' ');
 EXTERN int     fill_stlnc INIT(= ' ');
-#endif
-#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
 EXTERN int     fill_vert INIT(= ' ');
 EXTERN int     fill_fold INIT(= '-');
 EXTERN int     fill_diff INIT(= '-');
-#endif
 
 #ifdef FEAT_FOLDING
 EXTERN int     disable_fold_update INIT(= 0);
@@ -1510,9 +1485,7 @@ EXTERN char_u e_nopresub[]        INIT(= N_("E33: No previous substitute regular expres
 EXTERN char_u e_noprev[]       INIT(= N_("E34: No previous command"));
 EXTERN char_u e_noprevre[]     INIT(= N_("E35: No previous regular expression"));
 EXTERN char_u e_norange[]      INIT(= N_("E481: No range allowed"));
-#ifdef FEAT_WINDOWS
 EXTERN char_u e_noroom[]       INIT(= N_("E36: Not enough room"));
-#endif
 #ifdef FEAT_CLIENTSERVER
 EXTERN char_u e_noserver[]     INIT(= N_("E247: no registered server named \"%s\""));
 #endif
@@ -1583,10 +1556,8 @@ EXTERN char_u e_toomany[]        INIT(= N_("E77: Too many file names"));
 EXTERN char_u e_trailing[]     INIT(= N_("E488: Trailing characters"));
 EXTERN char_u e_umark[]                INIT(= N_("E78: Unknown mark"));
 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'"));
 EXTERN char_u e_winwidth[]     INIT(= N_("E592: 'winwidth' cannot be smaller than 'winminwidth'"));
-#endif
 EXTERN char_u e_write[]                INIT(= N_("E80: Error while writing"));
 EXTERN char_u e_zerocount[]    INIT(= N_("E939: Positive count required"));
 #ifdef FEAT_EVAL
index f714d7ac6bdba35c37c5a6ab00ddf38767946138..4f9c63f669d6af6bc87149652a2db68bd3e258b2 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -1642,9 +1642,7 @@ gui_set_shellsize(
 
     min_width = base_width + MIN_COLUMNS * gui.char_width;
     min_height = base_height + MIN_LINES * gui.char_height;
-#ifdef FEAT_WINDOWS
     min_height += tabline_height() * gui.char_height;
-#endif
 
 #ifdef FEAT_GUI_GTK
     if (un_maximize)
@@ -1828,7 +1826,6 @@ gui_write(
                        gui.scroll_region_bot = arg1;
                    }
                    break;
-#ifdef FEAT_WINDOWS
                case 'V':       /* Set vertical scroll region */
                    if (arg1 < arg2)
                    {
@@ -1841,7 +1838,6 @@ gui_write(
                        gui.scroll_region_right = arg1;
                    }
                    break;
-#endif
                case 'd':       /* Delete line */
                    gui_delete_lines(gui.row, 1);
                    break;
@@ -3154,16 +3150,11 @@ button_set:
      * Visual selection.
      */
     if ((State == NORMAL || State == NORMAL_BUSY || (State & INSERT))
-           && Y_2_ROW(y) >= topframe->fr_height
-# ifdef FEAT_WINDOWS
-                                               + firstwin->w_winrow
-# endif
+           && Y_2_ROW(y) >= topframe->fr_height + firstwin->w_winrow
            && button != MOUSE_DRAG
 # ifdef FEAT_MOUSESHAPE
            && !drag_status_line
-#  ifdef FEAT_WINDOWS
            && !drag_sep_line
-#  endif
 # endif
            )
        checkfor = MOUSE_NONE;
@@ -3439,7 +3430,6 @@ gui_init_which_components(char_u *oldval UNUSED)
            case GO_RIGHT:
                gui.which_scrollbars[SBAR_RIGHT] = TRUE;
                break;
-#ifdef FEAT_WINDOWS
            case GO_VLEFT:
                if (win_hasvertsplit())
                    gui.which_scrollbars[SBAR_LEFT] = TRUE;
@@ -3448,7 +3438,6 @@ gui_init_which_components(char_u *oldval UNUSED)
                if (win_hasvertsplit())
                    gui.which_scrollbars[SBAR_RIGHT] = TRUE;
                break;
-#endif
            case GO_BOT:
                gui.which_scrollbars[SBAR_BOTTOM] = TRUE;
                break;
@@ -3511,11 +3500,8 @@ gui_init_which_components(char_u *oldval UNUSED)
             * shown/unshown.  Thus we need two places to remember whether a
             * scrollbar is there or not. */
            if (gui.which_scrollbars[i] != prev_which_scrollbars[i]
-#ifdef FEAT_WINDOWS
                    || gui.which_scrollbars[i]
-                                       != curtab->tp_prev_which_scrollbars[i]
-#endif
-                   )
+                                       != curtab->tp_prev_which_scrollbars[i])
            {
                if (i == SBAR_BOTTOM)
                    gui_mch_enable_scrollbar(&gui.bottom_sbar,
@@ -3537,9 +3523,7 @@ gui_init_which_components(char_u *oldval UNUSED)
                        fix_size = TRUE;
                }
            }
-#ifdef FEAT_WINDOWS
            curtab->tp_prev_which_scrollbars[i] = gui.which_scrollbars[i];
-#endif
            prev_which_scrollbars[i] = gui.which_scrollbars[i];
        }
 
@@ -3615,12 +3599,10 @@ gui_init_which_components(char_u *oldval UNUSED)
                Columns = prev_Columns;
 #endif
        }
-#ifdef FEAT_WINDOWS
        /* When the console tabline appears or disappears the window positions
         * change. */
        if (firstwin->w_winrow != tabline_height())
            shell_new_rows();   /* recompute window positions and heights */
-#endif
     }
 }
 
@@ -3830,7 +3812,6 @@ send_tabline_menu_event(int tabidx, int event)
  * Scrollbar stuff:
  */
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Remove all scrollbars.  Used before switching to another tab page.
  */
@@ -3854,7 +3835,6 @@ gui_remove_scrollbars(void)
        curtab->tp_prev_which_scrollbars[i] = -1;
     }
 }
-#endif
 
     void
 gui_create_scrollbar(scrollbar_T *sb, int type, win_T *wp)
@@ -3872,9 +3852,7 @@ gui_create_scrollbar(scrollbar_T *sb, int type, win_T *wp)
     sb->max = 1;
     sb->top = 0;
     sb->height = 0;
-#ifdef FEAT_WINDOWS
     sb->width = 0;
-#endif
     sb->status_height = 0;
     gui_mch_create_scrollbar(sb, (wp == NULL) ? SBAR_HORIZ : SBAR_VERT);
 }
@@ -3917,9 +3895,7 @@ gui_find_scrollbar(long ident)
     void
 gui_drag_scrollbar(scrollbar_T *sb, long value, int still_dragging)
 {
-#ifdef FEAT_WINDOWS
     win_T      *wp;
-#endif
     int                sb_num;
 #ifdef USE_ON_FLY_SCROLL
     colnr_T    old_leftcol = curwin->w_leftcol;
@@ -4011,15 +3987,10 @@ gui_drag_scrollbar(scrollbar_T *sb, long value, int still_dragging)
     if (sb->wp != NULL)                /* vertical scrollbar */
     {
        sb_num = 0;
-#ifdef FEAT_WINDOWS
        for (wp = firstwin; wp != sb->wp && wp != NULL; wp = wp->w_next)
            sb_num++;
        if (wp == NULL)
            return;
-#else
-       if (sb->wp != curwin)
-           return;
-#endif
 
 #ifdef USE_ON_FLY_SCROLL
        current_scrollbar = sb_num;
@@ -4128,7 +4099,6 @@ gui_drag_scrollbar(scrollbar_T *sb, long value, int still_dragging)
  * Scrollbar stuff:
  */
 
-#if defined(FEAT_AUTOCMD) || defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Called when something in the window layout has changed.
  */
@@ -4143,7 +4113,6 @@ gui_may_update_scrollbars(void)
     }
     need_mouse_correct = TRUE;
 }
-#endif
 
     void
 gui_update_scrollbars(
@@ -4154,9 +4123,7 @@ gui_update_scrollbars(
     long       val, size, max;         /* need 32 bits here */
     int                which_sb;
     int                h, y;
-#ifdef FEAT_WINDOWS
     static win_T *prev_curwin = NULL;
-#endif
 
     /* Update the horizontal scrollbar */
     gui_update_horiz_scrollbar(force);
@@ -4249,22 +4216,17 @@ gui_update_scrollbars(
            continue;
        }
        if (force || sb->height != wp->w_height
-#ifdef FEAT_WINDOWS
            || sb->top != wp->w_winrow
            || sb->status_height != wp->w_status_height
            || sb->width != wp->w_width
-           || prev_curwin != curwin
-#endif
-           )
+           || prev_curwin != curwin)
        {
            /* Height, width or position of scrollbar has changed.  For
             * vertical split: curwin changed. */
            sb->height = wp->w_height;
-#ifdef FEAT_WINDOWS
            sb->top = wp->w_winrow;
            sb->status_height = wp->w_status_height;
            sb->width = wp->w_width;
-#endif
 
            /* Calculate height and position in pixels */
            h = (sb->height + sb->status_height) * gui.char_height;
@@ -4290,9 +4252,7 @@ gui_update_scrollbars(
                y += gui.tabline_height;
 #endif
 
-#ifdef FEAT_WINDOWS
            if (wp->w_winrow == 0)
-#endif
            {
                /* Height of top scrollbar includes width of top border */
                h += gui.border_offset;
@@ -4345,9 +4305,7 @@ gui_update_scrollbars(
                                            val, size, max);
        }
     }
-#ifdef FEAT_WINDOWS
     prev_curwin = curwin;
-#endif
     --hold_gui_events;
 }
 
@@ -4362,7 +4320,6 @@ gui_do_scrollbar(
     int                which,      /* SBAR_LEFT or SBAR_RIGHT */
     int                enable)     /* TRUE to enable scrollbar */
 {
-#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);
@@ -4393,7 +4350,6 @@ gui_do_scrollbar(
                enable = FALSE;
        }
     }
-#endif
     gui_mch_enable_scrollbar(&wp->w_scrollbars[which], enable);
 }
 
@@ -4863,11 +4819,9 @@ gui_mouse_moved(int x, int y)
        if (wp == curwin || wp == NULL)
            return;     /* still in the same old window, or none at all */
 
-#ifdef FEAT_WINDOWS
        /* Ignore position in the tab pages line. */
        if (Y_2_ROW(y) < tabline_height())
            return;
-#endif
 
        /*
         * format a mouse click on status line input
@@ -4886,11 +4840,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_WINDOWS
                wp->w_wincol == 0 ? -1 : wp->w_wincol + MOUSE_COLOFF,
-#else
-               -1,
-#endif
                wp->w_height + W_WINROW(wp));
 
        add_to_input_buf(st, 8);
@@ -4922,11 +4872,7 @@ gui_mouse_correct(void)
     /* Don't move the mouse when it's left or right of the Vim window */
     if (x < 0 || x > Columns * gui.char_width)
        return;
-    if (y >= 0
-# ifdef FEAT_WINDOWS
-           && Y_2_ROW(y) >= tabline_height()
-# endif
-       )
+    if (y >= 0 && Y_2_ROW(y) >= tabline_height())
        wp = xy2win(x, y);
     if (wp != curwin && wp != NULL)    /* If in other than current window */
     {
@@ -4943,7 +4889,6 @@ gui_mouse_correct(void)
     static win_T *
 xy2win(int x UNUSED, int y UNUSED)
 {
-#ifdef FEAT_WINDOWS
     int                row;
     int                col;
     win_T      *wp;
@@ -4955,7 +4900,7 @@ xy2win(int x UNUSED, int y UNUSED)
     wp = mouse_find_win(&row, &col);
     if (wp == NULL)
        return NULL;
-# ifdef FEAT_MOUSESHAPE
+#ifdef FEAT_MOUSESHAPE
     if (State == HITRETURN || State == ASKMORE)
     {
        if (Y_2_ROW(y) >= msg_row)
@@ -4973,11 +4918,8 @@ xy2win(int x UNUSED, int y UNUSED)
        update_mouseshape(SHAPE_IDX_STATUS);
     else
        update_mouseshape(-2);
-# endif
-    return wp;
-#else
-    return firstwin;
 #endif
+    return wp;
 }
 
 /*
@@ -5412,7 +5354,6 @@ gui_do_findrepl(
        || defined(FEAT_GUI_MAC) \
        || defined(PROTO)
 
-#ifdef FEAT_WINDOWS
 static void gui_wingoto_xy(int x, int y);
 
 /*
@@ -5432,7 +5373,6 @@ gui_wingoto_xy(int x, int y)
            win_goto(wp);
     }
 }
-#endif
 
 /*
  * Process file drop.  Mouse cursor position, key modifiers, name of files
@@ -5495,9 +5435,7 @@ gui_handle_drop(
     {
        /* Go to the window under mouse cursor, then shorten given "fnames" by
         * current window, because a window can have local current dir. */
-# ifdef FEAT_WINDOWS
        gui_wingoto_xy(x, y);
-# endif
        shorten_filenames(fnames, count);
 
        /* If Shift held down, remember the first item. */
index 37cc2399269abed0ffc1be3058a3e5be8984a518..91b4c2269169a910232e116d0bd4d6050220a14a 100644 (file)
--- a/src/gui.h
+++ b/src/gui.h
@@ -180,9 +180,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_WINDOWS
     int                width;          /* Current width of scroll bar in cols */
-#endif
     int                status_height;  /* Height of status line */
 #ifdef FEAT_GUI_X11
     Widget     id;             /* Id of real scroll bar */
index 18e3a8b0cf3a45d472ccef189a557ff5371bae22..d89c807f2baedfe9b9526fcdae3245f2066c668d 100644 (file)
@@ -1961,14 +1961,12 @@ gui_mch_create_scrollbar(
 #endif
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
     void
 gui_mch_destroy_scrollbar(scrollbar_T *sb)
 {
     if (sb->id != (Widget)0)
        XtDestroyWidget(sb->id);
 }
-#endif
 
     void
 gui_mch_set_scrollbar_colors(scrollbar_T *sb)
index 61ff2fc79752bef4269046d93c06d02690232598..2dbce7e595e5eb71cb375467c0857b12b841172a 100644 (file)
@@ -29,9 +29,7 @@ general_beval_cb(BalloonEval *beval, int state UNUSED)
     char_u     *bexpr;
     buf_T      *save_curbuf;
     size_t     len;
-# ifdef FEAT_WINDOWS
     win_T      *cw;
-# endif
 #endif
     static int recursive = FALSE;
 
@@ -53,11 +51,9 @@ general_beval_cb(BalloonEval *beval, int state UNUSED)
                                                    : wp->w_buffer->b_p_bexpr;
        if (*bexpr != NUL)
        {
-# ifdef FEAT_WINDOWS
            /* Convert window pointer to number. */
            for (cw = firstwin; cw != wp; cw = cw->w_next)
                ++winnr;
-# endif
 
            set_vim_var_nr(VV_BEVAL_BUFNR, (long)wp->w_buffer->b_fnum);
            set_vim_var_nr(VV_BEVAL_WINNR, winnr);
@@ -341,11 +337,7 @@ get_beval_info(
     *textp = NULL;
     row = Y_2_ROW(beval->y);
     col = X_2_COL(beval->x);
-#ifdef FEAT_WINDOWS
     wp = mouse_find_win(&row, &col);
-#else
-    wp = firstwin;
-#endif
     if (wp != NULL && row < wp->w_height && col < W_WIDTH(wp))
     {
        /* Found a window and the cursor is in the text.  Now find the line
index 34069781a3a239b3be502c9181c26fc4250ae28b..af8fcae11b9ac3ee4c60e3d61fd7b57969571d04 100644 (file)
@@ -1160,7 +1160,6 @@ gui_mch_create_scrollbar(scrollbar_T *sb, int orient)
     }
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
     void
 gui_mch_destroy_scrollbar(scrollbar_T *sb)
 {
@@ -1171,7 +1170,6 @@ gui_mch_destroy_scrollbar(scrollbar_T *sb)
     }
     gui_mch_update();
 }
-#endif
 
 #if defined(FEAT_BROWSE) || defined(PROTO)
 /*
index 4e4dffad936c5a59f53ea27b9764d800c43442b1..7e80b7fe891ff1b325ff206a1f1550f8be31c6c5 100644 (file)
@@ -1879,14 +1879,12 @@ gui_mch_create_scrollbar(
     }
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
     void
 gui_mch_destroy_scrollbar(scrollbar_T *sb)
 {
     if (sb->id != (Widget)0)
        XtDestroyWidget(sb->id);
 }
-#endif
 
     void
 gui_mch_set_scrollbar_colors(scrollbar_T *sb)
index c4a57e675a24cb61d01454f2cfa59af18ccfee75..d9ac8465eeb7a023123530bb7d44ae731cf86ba1 100644 (file)
@@ -2947,13 +2947,11 @@ _OnActivateApp(
     return MyWindowProc(hwnd, WM_ACTIVATEAPP, fActivate, (DWORD)dwThreadId);
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
     void
 gui_mch_destroy_scrollbar(scrollbar_T *sb)
 {
     DestroyWindow(sb->id);
 }
-#endif
 
 /*
  * Get current mouse coordinates in text window.
@@ -3785,12 +3783,11 @@ _OnDropFiles(
     HWND hwnd UNUSED,
     HDROP hDrop)
 {
-#ifdef FEAT_WINDOWS
-# define BUFPATHLEN _MAX_PATH
-# define DRAGQVAL 0xFFFFFFFF
-# ifdef FEAT_MBYTE
+#define BUFPATHLEN _MAX_PATH
+#define DRAGQVAL 0xFFFFFFFF
+#ifdef FEAT_MBYTE
     WCHAR   wszFile[BUFPATHLEN];
-# endif
+#endif
     char    szFile[BUFPATHLEN];
     UINT    cFiles = DragQueryFile(hDrop, DRAGQVAL, NULL, 0);
     UINT    i;
@@ -3811,11 +3808,11 @@ _OnDropFiles(
     if (fnames != NULL)
        for (i = 0; i < cFiles; ++i)
        {
-# ifdef FEAT_MBYTE
+#ifdef FEAT_MBYTE
            if (DragQueryFileW(hDrop, i, wszFile, BUFPATHLEN) > 0)
                fnames[i] = utf16_to_enc(wszFile, NULL);
            else
-# endif
+#endif
            {
                DragQueryFile(hDrop, i, szFile, BUFPATHLEN);
                fnames[i] = vim_strsave((char_u *)szFile);
@@ -3837,7 +3834,6 @@ _OnDropFiles(
 
        s_need_activate = TRUE;
     }
-#endif
 }
 
     static int
@@ -5463,9 +5459,7 @@ gui_mch_init(void)
 #endif
     s_hdc = GetDC(s_textArea);
 
-#ifdef FEAT_WINDOWS
     DragAcceptFiles(s_hwnd, TRUE);
-#endif
 
     /* Do we need to bother with this? */
     /* m_fMouseAvail = GetSystemMetrics(SM_MOUSEPRESENT); */
@@ -5781,7 +5775,7 @@ _OnImeNotify(HWND hWnd, DWORD dwCommand, DWORD dwData UNUSED)
                State &= ~LANGMAP;
                if (State & INSERT)
                {
-#if defined(FEAT_WINDOWS) && defined(FEAT_KEYMAP)
+#if defined(FEAT_KEYMAP)
                    /* Unshown 'keymap' in status lines */
                    if (curbuf->b_p_iminsert == B_IMODE_LMAP)
                    {
index 683251ca716590c81471719c4e8dc8b985e3cddd..168b3e49e326340cfde5759d22e7a725b995c695 100644 (file)
@@ -217,7 +217,6 @@ do_cscope_general(
        return;
     }
 
-#ifdef FEAT_WINDOWS
     if (make_split)
     {
        if (!cmdp->cansplit)
@@ -229,14 +228,11 @@ do_cscope_general(
        postponed_split_flags = cmdmod.split;
        postponed_split_tab = cmdmod.tab;
     }
-#endif
 
     cmdp->func(eap);
 
-#ifdef FEAT_WINDOWS
     postponed_split_flags = 0;
     postponed_split_tab = 0;
-#endif
 }
 
 /*
@@ -326,7 +322,7 @@ ex_cstag(exarg_T *eap)
     if (!ret)
     {
        (void)EMSG(_("E257: cstag: tag not found"));
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        g_do_tagpreview = 0;
 #endif
     }
@@ -1244,7 +1240,6 @@ cs_find_common(
            if (qf_init(wp, tmp, (char_u *)"%f%*\\t%l%*\\t%m",
                                          *qfpos == '-', cmdline, NULL) > 0)
            {
-# ifdef FEAT_WINDOWS
                if (postponed_split != 0)
                {
                    (void)win_split(postponed_split > 0 ? postponed_split : 0,
@@ -1252,7 +1247,6 @@ cs_find_common(
                    RESET_BINDING(curwin);
                    postponed_split = 0;
                }
-# endif
 
 # ifdef FEAT_AUTOCMD
                apply_autocmds(EVENT_QUICKFIXCMDPOST, (char_u *)"cscope",
@@ -2001,7 +1995,7 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
     char       *cstag_msg = _("Cscope tag: %s");
     char       *csfmt_str = "%4d %6s  ";
 
-    assert (num_matches > 0);
+    assert(num_matches > 0);
 
     if ((tbuf = (char *)alloc((unsigned)strlen(matches[0]) + 1)) == NULL)
        return;
index ad8ee1bf0c4de94747a061f16ee4716024b54408..ef827ca589de64df35ee103697ffcceba913cfc6 100644 (file)
@@ -1178,10 +1178,8 @@ 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_WINDOWS
     else if (strncmp(s, "width", 5) == 0)
        lua_pushinteger(L, W_WIDTH(w));
-#endif
     else if (strncmp(s, "height", 6) == 0)
        lua_pushinteger(L, w->w_height);
     /* methods */
@@ -1221,7 +1219,6 @@ luaV_window_newindex (lua_State *L)
        w->w_cursor.col = v - 1;
        update_screen(VALID);
     }
-#ifdef FEAT_WINDOWS
     else if (strncmp(s, "width", 5) == 0)
     {
        win_T *win = curwin;
@@ -1232,7 +1229,6 @@ luaV_window_newindex (lua_State *L)
        win_setwidth(v);
        curwin = win;
     }
-#endif
     else if (strncmp(s, "height", 6) == 0)
     {
        win_T *win = curwin;
index efe1e312898d00d662e0bc7fda0cae56696a0626..657782273163bc3fd98408a00884a2303664d74b 100644 (file)
@@ -145,10 +145,8 @@ static Scheme_Object *get_window_num(void *, int, Scheme_Object **);
 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_WINDOWS
 static Scheme_Object *get_window_width(void *, int, Scheme_Object **);
 static Scheme_Object *set_window_width(void *, int, Scheme_Object **);
-#endif
 static Scheme_Object *get_cursor(void *, int, Scheme_Object **);
 static Scheme_Object *set_cursor(void *, int, Scheme_Object **);
 static Scheme_Object *get_window_list(void *, int, Scheme_Object **);
@@ -1913,11 +1911,9 @@ get_curr_win(void *data UNUSED, int argc UNUSED, Scheme_Object **argv UNUSED)
 get_window_count(void *data UNUSED, int argc UNUSED, Scheme_Object **argv UNUSED)
 {
     int            n = 0;
-#ifdef FEAT_WINDOWS
     win_T   *w;
 
     FOR_ALL_WINDOWS(w)
-#endif
        ++n;
     return scheme_make_integer(n);
 }
@@ -1934,9 +1930,7 @@ get_window_list(void *data, int argc, Scheme_Object **argv)
     buf = get_buffer_arg(prim->name, 0, argc, argv);
     list = scheme_null;
 
-#ifdef FEAT_WINDOWS
     for ( ; w != NULL; w = w->w_next)
-#endif
        if (w->w_buffer == buf->buf)
        {
            list = scheme_make_pair(window_new(w), list);
@@ -1988,13 +1982,11 @@ window_new(win_T *win)
 get_window_num(void *data UNUSED, int argc UNUSED, Scheme_Object **argv UNUSED)
 {
     int                nr = 1;
-#ifdef FEAT_WINDOWS
     Vim_Prim   *prim = (Vim_Prim *)data;
     win_T      *win = get_window_arg(prim->name, 0, argc, argv)->win;
     win_T      *wp;
 
     for (wp = firstwin; wp != win; wp = wp->w_next)
-#endif
        ++nr;
 
     return scheme_make_integer(nr);
@@ -2012,9 +2004,7 @@ get_window_by_num(void *data, int argc, Scheme_Object **argv)
     if (fnum < 1)
        scheme_signal_error(_("window index is out of range"));
 
-#ifdef FEAT_WINDOWS
     for ( ; win != NULL; win = win->w_next, --fnum)
-#endif
        if (fnum == 1)      /* to be 1-based */
            return window_new(win);
 
@@ -2066,7 +2056,6 @@ set_window_height(void *data, int argc, Scheme_Object **argv)
     return scheme_void;
 }
 
-#ifdef FEAT_WINDOWS
 /* (get-win-width [window]) */
     static Scheme_Object *
 get_window_width(void *data, int argc, Scheme_Object **argv)
@@ -2101,7 +2090,6 @@ set_window_width(void *data, int argc, Scheme_Object **argv)
     raise_if_error();
     return scheme_void;
 }
-#endif
 
 /* (get-cursor [window]) -> (line . col) */
     static Scheme_Object *
@@ -3744,10 +3732,8 @@ 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_WINDOWS
     {get_window_width, "get-win-width", 0, 1},
     {set_window_width, "set-win-width", 1, 2},
-#endif
     {get_cursor, "get-cursor", 0, 1},
     {set_cursor, "set-cursor", 1, 2},
     {get_window_list, "get-win-list", 0, 1},
index c62e8d2d92696b30dd1c78054dfae5f1ad7af451..89368381379a817e883835f8e7cd80ee92091bed 100644 (file)
@@ -1451,24 +1451,6 @@ vim_IOLayer_init(void)
 }
 #endif /* PERLIO_LAYERS && !USE_SFIO */
 
-#ifndef FEAT_WINDOWS
-    int
-win_valid(win_T *w)
-{
-    return TRUE;
-}
-    int
-win_count(void)
-{
-    return 1;
-}
-    win_T *
-win_find_nr(int n)
-{
-    return curwin;
-}
-#endif
-
 XS(boot_VIM);
 
     static void
index cf696258e819efe8609224bbc4da4f6917d432c2..aa6f06bbcedbed19b56ba8e9f366c391e8e46dd8 100644 (file)
@@ -3872,14 +3872,12 @@ WindowAttr(WindowObject *self, char *name)
     }
     else if (strcmp(name, "height") == 0)
        return PyLong_FromLong((long)(self->win->w_height));
-#ifdef FEAT_WINDOWS
     else if (strcmp(name, "row") == 0)
        return PyLong_FromLong((long)(self->win->w_winrow));
     else if (strcmp(name, "width") == 0)
        return PyLong_FromLong((long)(W_WIDTH(self->win)));
     else if (strcmp(name, "col") == 0)
        return PyLong_FromLong((long)(W_WINCOL(self->win)));
-#endif
     else if (strcmp(name, "vars") == 0)
        return NEW_DICTIONARY(self->win->w_vars);
     else if (strcmp(name, "options") == 0)
@@ -3965,7 +3963,6 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject)
 
        return 0;
     }
-#ifdef FEAT_WINDOWS
     else if (strcmp(name, "width") == 0)
     {
        long    width;
@@ -3988,7 +3985,6 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject)
 
        return 0;
     }
-#endif
     else
     {
        PyErr_SetString(PyExc_AttributeError, name);
index a280459db0e86754eb06b92b900f7b395b6b3241..cbc7d97b9147f7d672bbab9b1f912a8352679336 100644 (file)
@@ -1438,7 +1438,6 @@ python_buffer_free(buf_T *buf)
     }
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
     void
 python_window_free(win_T *win)
 {
@@ -1460,7 +1459,6 @@ python_tabpage_free(tabpage_T *tab)
        TAB_PYTHON_REF(tab) = NULL;
     }
 }
-#endif
 
     static int
 PythonMod_Init(void)
index 6949b02ef53af160c5bf5cf2efbf625f63ca55a1..ac370fd577b44d37b42d4b5dc49e1fd215215591 100644 (file)
@@ -1571,7 +1571,6 @@ python3_buffer_free(buf_T *buf)
     }
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
     void
 python3_window_free(win_T *win)
 {
@@ -1593,7 +1592,6 @@ python3_tabpage_free(tabpage_T *tab)
        TAB_PYTHON_REF(tab) = NULL;
     }
 }
-#endif
 
     static PyObject *
 Py3Init_vim(void)
index d38ed2fbb1fb2cb9ef3d07e04a1416c1862ebabf..c1a6840f4d96958fae139059febaab767261535c 100644 (file)
@@ -1424,16 +1424,12 @@ static VALUE current_line_number(void)
 
 static VALUE window_s_count(void)
 {
-#ifdef FEAT_WINDOWS
     win_T      *w;
     int n = 0;
 
     FOR_ALL_WINDOWS(w)
        n++;
     return INT2NUM(n);
-#else
-    return INT2NUM(1);
-#endif
 }
 
 static VALUE window_s_aref(VALUE self UNUSED, VALUE num)
@@ -1441,11 +1437,7 @@ static VALUE window_s_aref(VALUE self UNUSED, VALUE num)
     win_T *w;
     int n = NUM2INT(num);
 
-#ifndef FEAT_WINDOWS
-    w = curwin;
-#else
     for (w = firstwin; w != NULL; w = w->w_next, --n)
-#endif
        if (n == 0)
            return window_new(w);
     return Qnil;
@@ -1483,14 +1475,12 @@ static VALUE window_width(VALUE self UNUSED)
 
 static VALUE window_set_width(VALUE self UNUSED, VALUE width)
 {
-#ifdef FEAT_WINDOWS
     win_T *win = get_win(self);
     win_T *savewin = curwin;
 
     curwin = win;
     win_setwidth(NUM2INT(width));
     curwin = savewin;
-#endif
     return width;
 }
 
index 9b47f1b04544c6b7591e80f48b09897f9d35b63c..690c6392b13c6214a1a7fa134328fb4285c4b253 100644 (file)
@@ -2083,7 +2083,6 @@ tcl_buffer_free(buf_T *buf)
     }
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
     void
 tcl_window_free(win_T *win)
 {
@@ -2102,6 +2101,5 @@ tcl_window_free(win_T *win)
        win->w_tcl_ref = NULL;
     }
 }
-#endif
 
 /* The End */
index e2c04f66c58538da638b99d8c30d21b1704358af..5233db563f1ab4a64da7c9b9fa2a05b5be055602 100644 (file)
@@ -47,9 +47,7 @@ static void command_line_scan(mparm_T *parmp);
 static void check_tty(mparm_T *parmp);
 static void read_stdin(void);
 static void create_windows(mparm_T *parmp);
-# ifdef FEAT_WINDOWS
 static void edit_buffers(mparm_T *parmp, char_u *cwd);
-# endif
 static void exe_pre_commands(mparm_T *parmp);
 static void exe_commands(mparm_T *parmp);
 static void source_startup_scripts(mparm_T *parmp);
@@ -141,9 +139,7 @@ main
 #ifdef FEAT_EVAL
     params.use_debug_break_level = -1;
 #endif
-#ifdef FEAT_WINDOWS
     params.window_count = -1;
-#endif
 
 #ifdef FEAT_RUBY
     {
@@ -754,13 +750,11 @@ vim_main2(void)
     }
 #endif
 
-#ifdef FEAT_WINDOWS
     /*
      * If opened more than one window, start editing files in the other
      * windows.
      */
     edit_buffers(&params, start_dir);
-#endif
     vim_free(start_dir);
 
 #ifdef FEAT_DIFF
@@ -867,7 +861,7 @@ vim_main2(void)
     mch_set_winsize_now();         /* Allow winsize changes from now on */
 #endif
 
-#if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
+#if defined(FEAT_GUI)
     /* When tab pages were created, may need to update the tab pages line and
      * scrollbars.  This is skipped while creating them. */
     if (first_tabpage->tp_next != NULL)
@@ -1257,9 +1251,7 @@ main_loop(
                update_screen(0);
            else if (redraw_cmdline || clear_cmdline)
                showmode();
-#ifdef FEAT_WINDOWS
            redraw_statuslines();
-#endif
 #ifdef FEAT_TITLE
            if (need_maketitle)
                maketitle();
@@ -1435,7 +1427,6 @@ getout(int exitval)
     if (get_vim_var_nr(VV_DYING) <= 1)
     {
        /* Trigger BufWinLeave for all windows, but only once per buffer. */
-# if defined FEAT_WINDOWS
        for (tp = first_tabpage; tp != NULL; tp = next_tp)
        {
            next_tp = tp->tp_next;
@@ -1456,10 +1447,6 @@ getout(int exitval)
                }
            }
        }
-# else
-       apply_autocmds(EVENT_BUFWINLEAVE, curbuf, curbuf->b_fname,
-                                                              FALSE, curbuf);
-# endif
 
        /* Trigger BufUnload for buffers that are loaded */
        FOR_ALL_BUFFERS(buf)
@@ -2102,30 +2089,24 @@ command_line_scan(mparm_T *parmp)
                    break;
                }
 #endif
-#ifdef FEAT_WINDOWS
                /* default is 0: open window for each file */
                parmp->window_count = get_number_arg((char_u *)argv[0],
                                                                &argv_idx, 0);
                parmp->window_layout = WIN_TABS;
-#endif
                break;
 
            case 'o':           /* "-o[N]" open N horizontal split 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);
                parmp->window_layout = WIN_HOR;
-#endif
                break;
 
                case 'O':       /* "-O[N]" open N vertical split 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);
                parmp->window_layout = WIN_VER;
-#endif
                break;
 
 #ifdef FEAT_QUICKFIX
@@ -2640,7 +2621,6 @@ read_stdin(void)
     static void
 create_windows(mparm_T *parmp UNUSED)
 {
-#ifdef FEAT_WINDOWS
     int                dorewind;
     int                done = 0;
 
@@ -2673,7 +2653,6 @@ create_windows(mparm_T *parmp UNUSED)
     }
     else
        parmp->window_count = 1;
-#endif
 
     if (recoverymode)                  /* do recover */
     {
@@ -2697,7 +2676,6 @@ create_windows(mparm_T *parmp UNUSED)
        ++autocmd_no_enter;
        ++autocmd_no_leave;
 #endif
-#ifdef FEAT_WINDOWS
        dorewind = TRUE;
        while (done++ < 1000)
        {
@@ -2721,7 +2699,6 @@ create_windows(mparm_T *parmp UNUSED)
                curwin = curwin->w_next;
            }
            dorewind = FALSE;
-#endif
            curbuf = curwin->w_buffer;
            if (curbuf->b_ml.ml_mfp == NULL)
            {
@@ -2762,7 +2739,6 @@ create_windows(mparm_T *parmp UNUSED)
                dorewind = TRUE;                /* start again */
 #endif
            }
-#ifdef FEAT_WINDOWS
            ui_breakcheck();
            if (got_int)
            {
@@ -2770,14 +2746,11 @@ create_windows(mparm_T *parmp UNUSED)
                break;
            }
        }
-#endif
-#ifdef FEAT_WINDOWS
        if (parmp->window_layout == WIN_TABS)
            goto_tabpage(1);
        else
            curwin = firstwin;
        curbuf = curwin->w_buffer;
-#endif
 #ifdef FEAT_AUTOCMD
        --autocmd_no_enter;
        --autocmd_no_leave;
@@ -2785,7 +2758,6 @@ create_windows(mparm_T *parmp UNUSED)
     }
 }
 
-#ifdef FEAT_WINDOWS
     /*
      * If opened more than one window, start editing files in the other
      * windows.  make_windows() has already opened the windows.
@@ -2893,7 +2865,7 @@ edit_buffers(
 
     /* make the first window the current window */
     win = firstwin;
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     /* Avoid making a preview window the current window. */
     while (win->w_p_pvw)
     {
@@ -2907,14 +2879,13 @@ edit_buffers(
 #endif
     win_enter(win, FALSE);
 
-# ifdef FEAT_AUTOCMD
+#ifdef FEAT_AUTOCMD
     --autocmd_no_leave;
-# endif
+#endif
     TIME_MSG("editing files in windows");
     if (parmp->window_count > 1 && parmp->window_layout != WIN_TABS)
        win_equal(curwin, FALSE, 'b');  /* adjust heights */
 }
-#endif /* FEAT_WINDOWS */
 
 /*
  * Execute the commands from --cmd arguments "cmds[cnt]".
@@ -3367,11 +3338,9 @@ usage(void)
     main_msg(_("-U <gvimrc>\t\tUse <gvimrc> instead of any .gvimrc"));
 #endif
     main_msg(_("--noplugin\t\tDon't load plugin scripts"));
-#ifdef FEAT_WINDOWS
     main_msg(_("-p[N]\t\tOpen N tab pages (default: one for each file)"));
     main_msg(_("-o[N]\t\tOpen N windows (default: one for each file)"));
     main_msg(_("-O[N]\t\tLike -o but split vertically"));
-#endif
     main_msg(_("+\t\t\tStart at end of file"));
     main_msg(_("+<lnum>\t\tStart at line <lnum>"));
     main_msg(_("--cmd <command>\tExecute <command> before loading any vimrc file"));
@@ -3394,9 +3363,7 @@ usage(void)
     main_msg(_("--remote-silent <files>  Same, don't complain if there is no server"));
     main_msg(_("--remote-wait <files>  As --remote but wait for files to have been edited"));
     main_msg(_("--remote-wait-silent <files>  Same, don't complain if there is no server"));
-# ifdef FEAT_WINDOWS
     main_msg(_("--remote-tab[-wait][-silent] <files>  As --remote but use tab page per file"));
-# endif
     main_msg(_("--remote-send <keys>\tSend <keys> to a Vim server and exit"));
     main_msg(_("--remote-expr <expr>\tEvaluate <expr> in a Vim server and print result"));
     main_msg(_("--serverlist\t\tList available Vim server names and exit"));
index db5f5715c60778bfa1e89eda7da28d50d15b235b..342bfcd9f7ae874d81af460ff5ba0726b87aeb8a 100644 (file)
@@ -1056,9 +1056,7 @@ mark_adjust_internal(
     int                fnum = curbuf->b_fnum;
     linenr_T   *lp;
     win_T      *win;
-#ifdef FEAT_WINDOWS
     tabpage_T  *tab;
-#endif
     static pos_T initpos = INIT_POS_T(1, 0, 0);
 
     if (line2 < line1 && amount_after == 0L)       /* nothing to do */
@@ -1340,7 +1338,6 @@ cleanup_jumplist(void)
     curwin->w_jumplistlen = to;
 }
 
-# if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Copy the jumplist from window "from" to window "to".
  */
@@ -1370,7 +1367,6 @@ free_jumplist(win_T *wp)
     for (i = 0; i < wp->w_jumplistlen; ++i)
        vim_free(wp->w_jumplist[i].fname);
 }
-# endif
 #endif /* FEAT_JUMPLIST */
 
     void
@@ -1895,7 +1891,6 @@ write_viminfo_marks(FILE *fp_out, garray_T *buflist)
     buf_T      *buf;
     int                is_mark_set;
     int                i;
-#ifdef FEAT_WINDOWS
     win_T      *win;
     tabpage_T  *tp;
 
@@ -1904,9 +1899,6 @@ write_viminfo_marks(FILE *fp_out, garray_T *buflist)
      */
     FOR_ALL_TAB_WINDOWS(tp, win)
        set_last_cursor(win);
-#else
-       set_last_cursor(curwin);
-#endif
 
     fputs(_("\n# History of marks within files (newest to oldest):\n"), fp_out);
     FOR_ALL_BUFFERS(buf)
index 458b545db98cc3f84b0eb9dc6290961262d28d8f..59393ae1d09b84c7d5997c6323960a0741fc364e 100644 (file)
@@ -2544,8 +2544,7 @@ ml_append(
     return ml_append_int(curbuf, lnum, line, len, newfile, FALSE);
 }
 
-#if defined(FEAT_SPELL) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \
-       || defined(PROTO)
+#if defined(FEAT_SPELL) || defined(FEAT_QUICKFIX) || defined(PROTO)
 /*
  * Like ml_append() but for an arbitrary buffer.  The buffer must already have
  * a memline.
@@ -3112,7 +3111,8 @@ ml_replace(linenr_T lnum, char_u *line, int copy)
 }
 
 /*
- * Delete line 'lnum' in the current buffer.
+ * Delete line "lnum" in the current buffer.
+ * When "message" is TRUE may give a "No lines in buffer" message.
  *
  * Check: The caller of this function should probably also call
  * deleted_lines() after this.
index 8ae75e6d85f3ab25885f444c3b79e1e49e00916e..369b716ad5625d2014322fde691fcdc3457f669b 100644 (file)
@@ -1984,10 +1984,8 @@ plines_win_nofill(
     if (!wp->w_p_wrap)
        return 1;
 
-#ifdef FEAT_WINDOWS
     if (wp->w_width == 0)
        return 1;
-#endif
 
 #ifdef FEAT_FOLDING
     /* A folded lines is handled just like an empty line. */
@@ -2060,10 +2058,8 @@ plines_win_col(win_T *wp, linenr_T lnum, long column)
     if (!wp->w_p_wrap)
        return lines + 1;
 
-#ifdef FEAT_WINDOWS
     if (wp->w_width == 0)
        return lines + 1;
-#endif
 
     line = s = ml_get_buf(wp->w_buffer, lnum, FALSE);
 
@@ -2787,10 +2783,8 @@ changed_int(void)
 {
     curbuf->b_changed = TRUE;
     ml_setflags(curbuf);
-#ifdef FEAT_WINDOWS
     check_status(curbuf);
     redraw_tabline = TRUE;
-#endif
 #ifdef FEAT_TITLE
     need_maketitle = TRUE;         /* set window title later */
 #endif
@@ -2995,9 +2989,7 @@ changed_common(
     long       xtra)
 {
     win_T      *wp;
-#ifdef FEAT_WINDOWS
     tabpage_T  *tp;
-#endif
     int                i;
 #ifdef FEAT_JUMPLIST
     int                cols;
@@ -3199,10 +3191,8 @@ unchanged(
        ml_setflags(buf);
        if (ff)
            save_file_ff(buf);
-#ifdef FEAT_WINDOWS
        check_status(buf);
        redraw_tabline = TRUE;
-#endif
 #ifdef FEAT_TITLE
        need_maketitle = TRUE;      /* set window title later */
 #endif
@@ -3213,7 +3203,6 @@ unchanged(
 #endif
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * check_status: called when the status bars for the buffer 'buf'
  *              need to be updated
@@ -3231,7 +3220,6 @@ check_status(buf_T *buf)
                must_redraw = VALID;
        }
 }
-#endif
 
 /*
  * If the file is readonly, give a warning message with the first change.
@@ -5024,8 +5012,6 @@ vim_ispathlistsep(int c)
 }
 #endif
 
-#if defined(FEAT_GUI_TABLINE) || defined(FEAT_WINDOWS) \
-       || defined(FEAT_EVAL) || defined(PROTO)
 /*
  * Shorten the path of a file from "~/foo/../.bar/fname" to "~/f/../.b/fname"
  * It's done in-place.
@@ -5068,7 +5054,6 @@ shorten_dir(char_u *str)
        }
     }
 }
-#endif
 
 /*
  * Return TRUE if the directory of "fname" exists, FALSE otherwise.
index 9e47b24b4b7217053f44cec45536fe420706ec3b..d956e3a6b8bfcc22171e155e9b41cc1c0a58dd00 100644 (file)
@@ -169,9 +169,7 @@ coladvance2(
 
        if (finetune
                && curwin->w_p_wrap
-# ifdef FEAT_WINDOWS
                && curwin->w_width != 0
-# endif
                && wcol >= (colnr_T)width)
        {
            csize = linetabsize(line);
@@ -1084,14 +1082,12 @@ free_all_mem(void)
     block_autocmds();
 # endif
 
-# ifdef FEAT_WINDOWS
     /* Close all tabs and windows.  Reset 'equalalways' to avoid redraws. */
     p_ea = FALSE;
     if (first_tabpage->tp_next != NULL)
        do_cmdline_cmd((char_u *)"tabonly!");
     if (!ONE_WINDOW)
        do_cmdline_cmd((char_u *)"only!");
-# endif
 
 # if defined(FEAT_SPELL)
     /* Free all spell info. */
@@ -1197,10 +1193,8 @@ free_all_mem(void)
     /* Close all script inputs. */
     close_all_scripts();
 
-#if defined(FEAT_WINDOWS)
     /* Destroy all windows.  Must come before freeing buffers. */
     win_free_all();
-#endif
 
     /* Free all buffers.  Reset 'autochdir' to avoid accessing things that
      * were freed already. */
@@ -1238,10 +1232,8 @@ free_all_mem(void)
 
     reset_last_sourcing();
 
-#ifdef FEAT_WINDOWS
     free_tabpage(first_tabpage);
     first_tabpage = NULL;
-#endif
 
 # ifdef UNIX
     /* Machine-specific free. */
@@ -3176,11 +3168,9 @@ set_fileformat(
        set_string_option_direct((char_u *)"ff", -1, (char_u *)p,
                                                     OPT_FREE | opt_flags, 0);
 
-#ifdef FEAT_WINDOWS
     /* This may cause the buffer to become (un)modified. */
     check_status(curbuf);
     redraw_tabline = TRUE;
-#endif
 #ifdef FEAT_TITLE
     need_maketitle = TRUE;         /* set window title later */
 #endif
@@ -3353,8 +3343,7 @@ same_directory(char_u *f1, char_u *f2)
 }
 
 #if defined(FEAT_SESSION) || defined(MSWIN) || defined(FEAT_GUI_MAC) \
-       || ((defined(FEAT_GUI_GTK)) \
-                       && ( defined(FEAT_WINDOWS) || defined(FEAT_DND)) ) \
+       || defined(FEAT_GUI_GTK) \
        || defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) \
        || defined(PROTO)
 /*
@@ -3728,10 +3717,8 @@ get_shape_idx(int mouse)
     }
     if (mouse && drag_status_line)
        return SHAPE_IDX_SDRAG;
-# ifdef FEAT_WINDOWS
     if (mouse && drag_sep_line)
        return SHAPE_IDX_VDRAG;
-# endif
 #endif
     if (!mouse && State == SHOWMATCH)
        return SHAPE_IDX_SM;
index a5ba011efae3dbe0b430355c594e5206a770bc7e..c520f5fd51806de3c23af514badbc621b652c5dc 100644 (file)
@@ -982,11 +982,7 @@ curs_columns(
        curwin->w_wcol = W_WIDTH(curwin) - 1;
        curwin->w_wrow = curwin->w_height - 1;
     }
-    else if (curwin->w_p_wrap
-#ifdef FEAT_WINDOWS
-           && curwin->w_width != 0
-#endif
-           )
+    else if (curwin->w_p_wrap && curwin->w_width != 0)
     {
        width = textwidth + curwin_col_off2();
 
@@ -1089,10 +1085,7 @@ curs_columns(
            && curwin->w_height != 0
            && curwin->w_cursor.lnum == curwin->w_topline
            && width > 0
-#ifdef FEAT_WINDOWS
-           && curwin->w_width != 0
-#endif
-           )
+           && curwin->w_width != 0)
     {
        /* Cursor past end of screen.  Happens with a single line that does
         * not fit on screen.  Find a skipcol to show the text around the
@@ -1251,11 +1244,7 @@ scrolldown(
      * and move the cursor onto the displayed part of the window.
      */
     wrow = curwin->w_wrow;
-    if (curwin->w_p_wrap
-#ifdef FEAT_WINDOWS
-               && curwin->w_width != 0
-#endif
-           )
+    if (curwin->w_p_wrap && curwin->w_width != 0)
     {
        validate_virtcol();
        validate_cheight();
@@ -1460,11 +1449,7 @@ scrolldown_clamp(void)
 #else
     end_row += plines(curwin->w_topline - 1);
 #endif
-    if (curwin->w_p_wrap
-#ifdef FEAT_WINDOWS
-               && curwin->w_width != 0
-#endif
-           )
+    if (curwin->w_p_wrap && curwin->w_width != 0)
     {
        validate_cheight();
        validate_virtcol();
@@ -1524,11 +1509,7 @@ scrollup_clamp(void)
 #else
     start_row = curwin->w_wrow - plines(curwin->w_topline);
 #endif
-    if (curwin->w_p_wrap
-#ifdef FEAT_WINDOWS
-               && curwin->w_width != 0
-#endif
-           )
+    if (curwin->w_p_wrap && curwin->w_width != 0)
     {
        validate_virtcol();
        start_row -= curwin->w_virtcol / W_WIDTH(curwin);
@@ -2855,9 +2836,7 @@ do_check_cursorbind(void)
            /* Only scroll when 'scrollbind' hasn't done this. */
            if (!curwin->w_p_scb)
                update_topline();
-# ifdef FEAT_WINDOWS
            curwin->w_redr_status = TRUE;
-# endif
        }
     }
 
index 93563b115e1caabc8caa9e680a511488431f2612..3685e151a8a6efa578b75c02049fc5824e5f1516 100644 (file)
@@ -1754,10 +1754,8 @@ nb_do_cmd(
            buf->modified = buf->bufp->b_changed;
            if (prev_b_changed != buf->bufp->b_changed)
            {
-#ifdef FEAT_WINDOWS
                check_status(buf->bufp);
                redraw_tabline = TRUE;
-#endif
 #ifdef FEAT_TITLE
                maketitle();
 #endif
@@ -2283,10 +2281,8 @@ nb_set_curbuf(buf_T *buf)
     if (curbuf != buf) {
        if (buf_jump_open_win(buf) != NULL)
            return;
-# ifdef FEAT_WINDOWS
        if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf) != NULL)
            return;
-# endif
        set_curbuf(buf, DOBUF_GOTO);
     }
 }
index cbdfbc43974473d5dbc7c9705c7d3f6994c48ea0..a8b6ffa16d3f88c3d93508c69173f5878ffecff9 100644 (file)
@@ -2327,10 +2327,8 @@ do_mouse(
     pos_T      start_visual;
     int                moved;          /* Has cursor moved? */
     int                in_status_line; /* mouse in status line */
-#ifdef FEAT_WINDOWS
     static int in_tab_line = FALSE; /* mouse clicked in tab line */
     int                in_sep_line;    /* mouse in vertical separator line */
-#endif
     int                c1, c2;
 #if defined(FEAT_FOLDING)
     pos_T      save_cursor;
@@ -2424,13 +2422,11 @@ do_mouse(
        if (!is_drag)                   /* release, reset got_click */
        {
            got_click = FALSE;
-#ifdef FEAT_WINDOWS
            if (in_tab_line)
            {
                in_tab_line = FALSE;
                return FALSE;
            }
-#endif
        }
     }
 
@@ -2570,7 +2566,6 @@ do_mouse(
 
     start_visual.lnum = 0;
 
-#ifdef FEAT_WINDOWS
     /* Check for clicking in the tab page line. */
     if (mouse_row == 0 && firstwin->w_winrow > 0)
     {
@@ -2641,8 +2636,6 @@ do_mouse(
        return FALSE;
     }
 
-#endif
-
     /*
      * When 'mousemodel' is "popup" or "popup_setpos", translate mouse events:
      * right button up   -> pop-up menu
@@ -2803,9 +2796,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_WINDOWS
     in_sep_line = (jump_flags & IN_SEP_LINE);
-#endif
 
 #ifdef FEAT_NETBEANS_INTG
     if (isNetbeansBuffer(curbuf)
@@ -2984,7 +2975,7 @@ do_mouse(
        do_put(regname, dir, count, fixindent | PUT_CURSEND);
     }
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     /*
      * Ctrl-Mouse click or double click in a quickfix window jumps to the
      * error under the mouse pointer.
@@ -3039,18 +3030,16 @@ do_mouse(
        }
 #endif
     }
-#ifdef FEAT_WINDOWS
     else if (in_sep_line)
     {
-# ifdef FEAT_MOUSESHAPE
+#ifdef FEAT_MOUSESHAPE
        if ((is_drag || is_click) && !drag_sep_line)
        {
            drag_sep_line = TRUE;
            update_mouseshape(-1);
        }
-# endif
-    }
 #endif
+    }
     else if ((mod_mask & MOD_MASK_MULTI_CLICK) && (State & (NORMAL | INSERT))
             && mouse_has(MOUSE_VISUAL))
     {
@@ -4105,9 +4094,7 @@ check_scrollbind(linenr_T topline_diff, long leftcol_diff)
 
                redraw_later(VALID);
                cursor_correct();
-#ifdef FEAT_WINDOWS
                curwin->w_redr_status = TRUE;
-#endif
            }
 
            /*
@@ -4197,7 +4184,6 @@ nv_page(cmdarg_T *cap)
 {
     if (!checkclearop(cap->oap))
     {
-#ifdef FEAT_WINDOWS
        if (mod_mask & MOD_MASK_CTRL)
        {
            /* <C-PageUp>: tab page back; <C-PageDown>: tab page forward */
@@ -4207,8 +4193,7 @@ nv_page(cmdarg_T *cap)
                goto_tabpage((int)cap->count0);
        }
        else
-#endif
-       (void)onepage(cap->arg, cap->count1);
+           (void)onepage(cap->arg, cap->count1);
     }
 }
 
@@ -4468,9 +4453,7 @@ nv_screengo(oparg_T *oap, int dir, long dist)
     if (width2 == 0)
        width2 = 1; /* avoid divide by zero */
 
-#ifdef FEAT_WINDOWS
     if (curwin->w_width != 0)
-#endif
     {
       /*
        * Instead of sticking at the last character of the buffer line we
@@ -4607,7 +4590,6 @@ nv_screengo(oparg_T *oap, int dir, long dist)
     static void
 nv_mousescroll(cmdarg_T *cap)
 {
-# ifdef FEAT_WINDOWS
     win_T *old_curwin = curwin, *wp;
 
     if (mouse_row >= 0 && mouse_col >= 0)
@@ -4624,7 +4606,6 @@ nv_mousescroll(cmdarg_T *cap)
        curwin = wp;
        curbuf = curwin->w_buffer;
     }
-# endif
 
     if (cap->arg == MSCR_UP || cap->arg == MSCR_DOWN)
     {
@@ -4663,12 +4644,10 @@ nv_mousescroll(cmdarg_T *cap)
     }
 # endif
 
-# ifdef FEAT_WINDOWS
     curwin->w_redr_status = TRUE;
 
     curwin = old_curwin;
     curbuf = curwin->w_buffer;
-# endif
 }
 
 /*
@@ -5539,7 +5518,6 @@ nv_Zet(cmdarg_T *cap)
     }
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Call nv_ident() as if "c1" was used, with "c2" as next character.
  */
@@ -5556,7 +5534,6 @@ do_nv_ident(int c1, int c2)
     ca.nchar = c2;
     nv_ident(&ca);
 }
-#endif
 
 /*
  * Handle the commands that use the word under the cursor.
@@ -6198,7 +6175,7 @@ nv_down(cmdarg_T *cap)
        nv_page(cap);
     }
     else
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     /* In a quickfix window a <CR> jumps to the error under the cursor. */
     if (bt_quickfix(curbuf) && cap->cmdchar == CAR)
     {
@@ -7846,15 +7823,11 @@ n_start_visual_mode(int c)
     static void
 nv_window(cmdarg_T *cap)
 {
-#ifdef FEAT_WINDOWS
     if (cap->nchar == ':')
        /* "CTRL-W :" is the same as typing ":"; useful in a terminal window */
        nv_colon(cap);
     else if (!checkclearop(cap->oap))
        do_window(cap->nchar, cap->count0, NUL); /* everything is in window.c */
-#else
-    (void)checkclearop(cap->oap);
-#endif
 }
 
 /*
@@ -8098,11 +8071,7 @@ nv_g_cmd(cmdarg_T *cap)
     case K_KHOME:
        oap->motion_type = MCHAR;
        oap->inclusive = FALSE;
-       if (curwin->w_p_wrap
-#ifdef FEAT_WINDOWS
-               && curwin->w_width != 0
-#endif
-               )
+       if (curwin->w_p_wrap && curwin->w_width != 0)
        {
            int         width1 = W_WIDTH(curwin) - curwin_col_off();
            int         width2 = width1 + curwin_col_off2();
@@ -8165,11 +8134,7 @@ nv_g_cmd(cmdarg_T *cap)
 
            oap->motion_type = MCHAR;
            oap->inclusive = TRUE;
-           if (curwin->w_p_wrap
-#ifdef FEAT_WINDOWS
-                   && curwin->w_width != 0
-#endif
-              )
+           if (curwin->w_p_wrap && curwin->w_width != 0)
            {
                curwin->w_curswant = MAXCOL;    /* so we stay at the end */
                if (cap->count1 == 1)
@@ -8440,7 +8405,6 @@ nv_g_cmd(cmdarg_T *cap)
        break;
 #endif
 
-#ifdef FEAT_WINDOWS
     case 't':
        if (!checkclearop(oap))
            goto_tabpage((int)cap->count0);
@@ -8449,7 +8413,6 @@ nv_g_cmd(cmdarg_T *cap)
        if (!checkclearop(oap))
            goto_tabpage(-(int)cap->count1);
        break;
-#endif
 
     case '+':
     case '-': /* "g+" and "g-": undo or redo along the timeline */
index 828d9eb46464903eb26031a47d1f3523ba2ec07b..4e2b929693fe7494f081e2644317e9bb041dd5c3 100644 (file)
 #ifdef FEAT_LINEBREAK
 # define PV_NUW                OPT_WIN(WV_NUW)
 #endif
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
 # define PV_PVW                OPT_WIN(WV_PVW)
 #endif
 #ifdef FEAT_RIGHTLEFT
 # define PV_STL                OPT_BOTH(OPT_WIN(WV_STL))
 #endif
 #define PV_UL          OPT_BOTH(OPT_BUF(BV_UL))
-#ifdef FEAT_WINDOWS
 # define PV_WFH                OPT_WIN(WV_WFH)
 # define PV_WFW                OPT_WIN(WV_WFW)
-#endif
 #define PV_WRAP                OPT_WIN(WV_WRAP)
 #ifdef FEAT_CURSORBIND
 # define PV_CRBIND     OPT_WIN(WV_CRBIND)
@@ -475,16 +473,7 @@ struct vimoption
 # define ISP_LATIN1 (char_u *)"@,161-255"
 #endif
 
-/* Make the string as short as possible when compiling with few features. */
-#if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
-       || defined(FEAT_WINDOWS) || defined(FEAT_CLIPBOARD) \
-       || defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) \
-       || defined(FEAT_CONCEAL) || defined(FEAT_QUICKFIX) \
-       || defined(FEAT_TERMINAL)
 # define HIGHLIGHT_INIT "8:SpecialKey,~:EndOfBuffer,@: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,q:QuickFixLine,z:StatusLineTerm,Z:StatusLineTermNC"
-#else
-# 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,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill"
-#endif
 
 /* Default python version for pyx* commands */
 #if defined(FEAT_PYTHON) && defined(FEAT_PYTHON3)
@@ -1069,13 +1058,8 @@ 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_WINDOWS
                            (char_u *)&p_ead, PV_NONE,
                            {(char_u *)"both", (char_u *)0L}
-#else
-                           (char_u *)NULL, PV_NONE,
-                           {(char_u *)NULL, (char_u *)0L}
-#endif
                            SCRIPTID_INIT},
     {"edcompatible","ed",   P_BOOL|P_VI_DEF,
                            (char_u *)&p_ed, PV_NONE,
@@ -1190,13 +1174,8 @@ static struct vimoption options[] =
 #endif
                            SCRIPTID_INIT},
     {"fillchars",   "fcs",  P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP,
-#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
                            (char_u *)&p_fcs, PV_NONE,
                            {(char_u *)"vert:|,fold:-", (char_u *)0L}
-#else
-                           (char_u *)NULL, PV_NONE,
-                           {(char_u *)"", (char_u *)0L}
-#endif
                            SCRIPTID_INIT},
     {"fixendofline",  "fixeol", P_BOOL|P_VI_DEF|P_RSTAT,
                            (char_u *)&p_fixeol, PV_FIXEOL,
@@ -1495,11 +1474,7 @@ static struct vimoption options[] =
                            {(char_u *)DFLT_HELPFILE, (char_u *)0L}
                            SCRIPTID_INIT},
     {"helpheight",  "hh",   P_NUM|P_VI_DEF,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_hh, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
     {"helplang",    "hlg",  P_STRING|P_VI_DEF|P_ONECOMMA,
 #ifdef FEAT_MULTI_LANG
@@ -1806,11 +1781,7 @@ static struct vimoption options[] =
 #endif
                            {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
     {"laststatus",  "ls",   P_NUM|P_VI_DEF|P_RALL,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_ls, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
     {"lazyredraw",  "lz",   P_BOOL|P_VI_DEF,
                            (char_u *)&p_lz, PV_NONE,
@@ -2139,14 +2110,14 @@ static struct vimoption options[] =
                            (char_u *)&p_pi, PV_PI,
                            {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
     {"previewheight", "pvh", P_NUM|P_VI_DEF,
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                            (char_u *)&p_pvh, PV_NONE,
 #else
                            (char_u *)NULL, PV_NONE,
 #endif
                            {(char_u *)12L, (char_u *)0L} SCRIPTID_INIT},
     {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                            (char_u *)VAR_WIN, PV_PVW,
 #else
                            (char_u *)NULL, PV_NONE,
@@ -2539,11 +2510,7 @@ static struct vimoption options[] =
                            (char_u *)&p_smd, PV_NONE,
                            {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
     {"showtabline", "stal", P_NUM|P_VI_DEF|P_RALL,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_stal, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
     {"sidescroll",  "ss",   P_NUM|P_VI_DEF,
                            (char_u *)&p_ss, PV_NONE,
@@ -2628,18 +2595,10 @@ static struct vimoption options[] =
 #endif
                            SCRIPTID_INIT},
     {"splitbelow",  "sb",   P_BOOL|P_VI_DEF,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_sb, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
     {"splitright",  "spr",  P_BOOL|P_VI_DEF,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_spr, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
     {"startofline", "sol",  P_BOOL|P_VI_DEF|P_VIM,
                            (char_u *)&p_sol, PV_NONE,
@@ -2699,11 +2658,7 @@ static struct vimoption options[] =
 #endif
                            {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
     {"tabpagemax",  "tpm",  P_NUM|P_VI_DEF,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_tpm, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)10L, (char_u *)0L} SCRIPTID_INIT},
     {"tabstop",            "ts",   P_NUM|P_VI_DEF|P_RBUF,
                            (char_u *)&p_ts, PV_TS,
@@ -3067,39 +3022,19 @@ static struct vimoption options[] =
                            (char_u *)&p_window, PV_NONE,
                            {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
     {"winheight",   "wh",   P_NUM|P_VI_DEF,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_wh, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
     {"winfixheight", "wfh", P_BOOL|P_VI_DEF|P_RSTAT,
-#ifdef FEAT_WINDOWS
                            (char_u *)VAR_WIN, PV_WFH,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
     {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT,
-#ifdef FEAT_WINDOWS
                            (char_u *)VAR_WIN, PV_WFW,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
     {"winminheight", "wmh", P_NUM|P_VI_DEF,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_wmh, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
     {"winminwidth", "wmw", P_NUM|P_VI_DEF,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_wmw, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
     {"winptydll", NULL,            P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
 #if defined(WIN3264) && defined(FEAT_TERMINAL)
@@ -3116,11 +3051,7 @@ static struct vimoption options[] =
 #endif
                            SCRIPTID_INIT},
     {"winwidth",   "wiw",   P_NUM|P_VI_DEF,
-#ifdef FEAT_WINDOWS
                            (char_u *)&p_wiw, PV_NONE,
-#else
-                           (char_u *)NULL, PV_NONE,
-#endif
                            {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
     {"wrap",       NULL,   P_BOOL|P_VI_DEF|P_RWIN,
                            (char_u *)VAR_WIN, PV_WRAP,
@@ -3171,9 +3102,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_WINDOWS
     p_term("t_CV", T_CSV)
-#endif
     p_term("t_da", T_DA)
     p_term("t_db", T_DB)
     p_term("t_DL", T_CDL)
@@ -3265,9 +3194,7 @@ static char *(p_bsdir_values[]) = {"current", "last", "buffer", NULL};
 static char *(p_scbopt_values[]) = {"ver", "hor", "jump", NULL};
 #endif
 static char *(p_debug_values[]) = {"msg", "throw", "beep", NULL};
-#ifdef FEAT_WINDOWS
 static char *(p_ead_values[]) = {"both", "ver", "hor", NULL};
-#endif
 #ifdef FEAT_AUTOCMD
 static char *(p_buftype_values[]) = {"nofile", "nowrite", "quickfix", "help", "terminal", "acwrite", NULL};
 #else
@@ -3855,10 +3782,8 @@ set_options_default(
     int                opt_flags)      /* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
 {
     int                i;
-#ifdef FEAT_WINDOWS
     win_T      *wp;
     tabpage_T  *tp;
-#endif
 
     for (i = 0; !istermoption(&options[i]); i++)
        if (!(options[i].flags & P_NODEFAULT)
@@ -3877,13 +3802,9 @@ set_options_default(
                        )
            set_option_default(i, opt_flags, p_cp);
 
-#ifdef FEAT_WINDOWS
     /* The 'scroll' option must be computed for all windows. */
     FOR_ALL_TAB_WINDOWS(tp, wp)
        win_comp_scroll(wp);
-#else
-       win_comp_scroll(curwin);
-#endif
 #ifdef FEAT_CINDENT
     parse_cino(curbuf);
 #endif
@@ -5633,10 +5554,8 @@ didset_options2(void)
     check_opt_wim();
 
     (void)set_chars_option(&p_lcs);
-#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
     /* Parse default for 'fillchars'. */
     (void)set_chars_option(&p_fcs);
-#endif
 
 #ifdef FEAT_CLIPBOARD
     /* Parse default for 'clipboard' */
@@ -5875,9 +5794,7 @@ static void redraw_titles(void);
 static void redraw_titles(void)
 {
     need_maketitle = TRUE;
-# ifdef FEAT_WINDOWS
     redraw_tabline = TRUE;
-# endif
 }
 #endif
 
@@ -6280,10 +6197,8 @@ did_set_string_option(
            errmsg = e_invarg;
        else if (set_chars_option(&p_lcs) != NULL)
            errmsg = (char_u *)_("E834: Conflicts with value of 'listchars'");
-# if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
        else if (set_chars_option(&p_fcs) != NULL)
            errmsg = (char_u *)_("E835: Conflicts with value of 'fillchars'");
-# endif
     }
 #endif
 
@@ -6503,9 +6418,7 @@ did_set_string_option(
                set_iminsert_global();
                set_imsearch_global();
            }
-# ifdef FEAT_WINDOWS
            status_redraw_curbuf();
-# endif
        }
     }
 #endif
@@ -6708,13 +6621,11 @@ did_set_string_option(
        errmsg = set_chars_option(varp);
     }
 
-#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
     /* 'fillchars' */
     else if (varp == &p_fcs)
     {
        errmsg = set_chars_option(varp);
     }
-#endif
 
 #ifdef FEAT_CMDWIN
     /* 'cedit' */
@@ -7088,14 +6999,12 @@ did_set_string_option(
 
     }
 
-#ifdef FEAT_WINDOWS
     /* 'eadirection' */
     else if (varp == &p_ead)
     {
        if (check_opt_strings(p_ead, p_ead_values, FALSE) != OK)
            errmsg = e_invarg;
     }
-#endif
 
 #ifdef FEAT_CLIPBOARD
     /* 'clipboard' */
@@ -7144,13 +7053,11 @@ did_set_string_option(
            errmsg = e_invarg;
        else
        {
-#ifdef FEAT_WINDOWS
            if (curwin->w_status_height)
            {
                curwin->w_redr_status = TRUE;
                redraw_later(VALID);
            }
-#endif
            curbuf->b_help = (curbuf->b_p_bt[0] == 'h');
 #ifdef FEAT_TITLE
            redraw_titles();
@@ -7773,7 +7680,6 @@ set_chars_option(char_u **varp)
        int     *cp;
        char    *name;
     };
-#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
     static struct charstab filltab[] =
     {
        {&fill_stl,     "stl"},
@@ -7782,7 +7688,6 @@ set_chars_option(char_u **varp)
        {&fill_fold,    "fold"},
        {&fill_diff,    "diff"},
     };
-#endif
     static struct charstab lcstab[] =
     {
        {&lcs_eol,      "eol"},
@@ -7800,20 +7705,16 @@ set_chars_option(char_u **varp)
     };
     struct charstab *tab;
 
-#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
     if (varp == &p_lcs)
-#endif
     {
        tab = lcstab;
        entries = sizeof(lcstab) / sizeof(struct charstab);
     }
-#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
     else
     {
        tab = filltab;
        entries = sizeof(filltab) / sizeof(struct charstab);
     }
-#endif
 
     /* first round: check for valid value, second round: assign values */
     for (round = 0; round <= 1; ++round)
@@ -7827,10 +7728,8 @@ set_chars_option(char_u **varp)
                    *(tab[i].cp) = (varp == &p_lcs ? NUL : ' ');
            if (varp == &p_lcs)
                lcs_tab1 = NUL;
-#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
            else
                fill_diff = '-';
-#endif
        }
        p = *varp;
        while (*p)
@@ -8077,9 +7976,7 @@ did_set_spell_option(int is_spellfile)
            if (wp->w_buffer == curbuf && wp->w_p_spell)
            {
                errmsg = did_set_spelllang(wp);
-# ifdef FEAT_WINDOWS
                break;
-# endif
            }
     }
     return errmsg;
@@ -8388,7 +8285,7 @@ set_bool_option(
     }
 #endif
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     /* There can be only one window with 'previewwindow' set. */
     else if ((int *)varp == &curwin->w_p_pvw)
     {
@@ -8486,13 +8383,11 @@ set_bool_option(
            curwin->w_leftcol = 0;
     }
 
-#ifdef FEAT_WINDOWS
     else if ((int *)varp == &p_ea)
     {
        if (p_ea && !old_value)
            win_equal(curwin, FALSE, 0);
     }
-#endif
 
     else if ((int *)varp == &p_wiv)
     {
@@ -8803,7 +8698,6 @@ set_num_option(
     /*
      * Number options that need some action when changed
      */
-#ifdef FEAT_WINDOWS
     if (pp == &p_wh || pp == &p_hh)
     {
        if (p_wh < 1)
@@ -8847,8 +8741,6 @@ set_num_option(
        }
        win_setminheight();
     }
-
-# ifdef FEAT_WINDOWS
     else if (pp == &p_wiw)
     {
        if (p_wiw < 1)
@@ -8882,11 +8774,7 @@ set_num_option(
        }
        win_setminheight();
     }
-# endif
-
-#endif
 
-#ifdef FEAT_WINDOWS
     /* (re)set last window status line */
     else if (pp == &p_ls)
     {
@@ -8898,7 +8786,6 @@ set_num_option(
     {
        shell_new_rows();       /* recompute window positions and heights */
     }
-#endif
 
 #ifdef FEAT_GUI
     else if (pp == &p_linespace)
@@ -8987,7 +8874,7 @@ set_num_option(
        p_iminsert = curbuf->b_p_iminsert;
        if (termcap_active)     /* don't do this in the alternate screen */
            showmode();
-#if defined(FEAT_WINDOWS) && defined(FEAT_KEYMAP)
+#if defined(FEAT_KEYMAP)
        /* Show/unshow value of 'keymap' in status lines. */
        status_redraw_curbuf();
 #endif
@@ -9137,7 +9024,6 @@ set_num_option(
            curbuf->b_p_tw = 0;
        }
 #ifdef FEAT_SYN_HL
-# ifdef FEAT_WINDOWS
        {
            win_T       *wp;
            tabpage_T   *tp;
@@ -9145,9 +9031,6 @@ set_num_option(
            FOR_ALL_TAB_WINDOWS(tp, wp)
                check_colorcolumn(wp);
        }
-# else
-       check_colorcolumn(curwin);
-# endif
 #endif
     }
 
@@ -9329,10 +9212,8 @@ check_redraw(long_u flags)
     int                doclear = (flags & P_RCLR) == P_RCLR;
     int                all = ((flags & P_RALL) == P_RALL || doclear);
 
-#ifdef FEAT_WINDOWS
     if ((flags & P_RSTAT) || all)      /* mark all status lines dirty */
        status_redraw_all();
-#endif
 
     if ((flags & P_RBUF) || (flags & P_RWIN) || all)
        changed_window_setting();
@@ -10420,18 +10301,18 @@ istermoption(struct vimoption *p)
     void
 comp_col(void)
 {
-#if defined(FEAT_CMDL_INFO) && defined(FEAT_WINDOWS)
+#if defined(FEAT_CMDL_INFO)
     int last_has_status = (p_ls == 2 || (p_ls == 1 && !ONE_WINDOW));
 
     sc_col = 0;
     ru_col = 0;
     if (p_ru)
     {
-#ifdef FEAT_STL_OPT
+# ifdef FEAT_STL_OPT
        ru_col = (ru_wid ? ru_wid : COL_RULER) + 1;
-#else
+# else
        ru_col = COL_RULER + 1;
-#endif
+# endif
        /* no last status line, adjust sc_col */
        if (!last_has_status)
            sc_col = ru_col;
@@ -10723,11 +10604,9 @@ get_varp(struct vimoption *p)
 #ifdef FEAT_LINEBREAK
        case PV_NUW:    return (char_u *)&(curwin->w_p_nuw);
 #endif
-#ifdef FEAT_WINDOWS
        case PV_WFH:    return (char_u *)&(curwin->w_p_wfh);
        case PV_WFW:    return (char_u *)&(curwin->w_p_wfw);
-#endif
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        case PV_PVW:    return (char_u *)&(curwin->w_p_pvw);
 #endif
 #ifdef FEAT_RIGHTLEFT
@@ -10879,7 +10758,6 @@ get_equalprg(void)
     return curbuf->b_p_ep;
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Copy options from one window to another.
  * Used when splitting a window.
@@ -10899,7 +10777,6 @@ win_copy_options(win_T *wp_from, win_T *wp_to)
     briopt_check(wp_to);
 #endif
 }
-#endif
 
 /*
  * Copy the options from one winopt_T to another.
@@ -12176,10 +12053,8 @@ paste_option_changed(void)
        p_sm = 0;                   /* no showmatch */
        p_sta = 0;                  /* no smarttab */
 #ifdef FEAT_CMDL_INFO
-# ifdef FEAT_WINDOWS
        if (p_ru)
            status_redraw_all();    /* redraw to remove the ruler */
-# endif
        p_ru = 0;                   /* no ruler */
 #endif
 #ifdef FEAT_RIGHTLEFT
@@ -12212,10 +12087,8 @@ paste_option_changed(void)
        p_sm = save_sm;
        p_sta = save_sta;
 #ifdef FEAT_CMDL_INFO
-# ifdef FEAT_WINDOWS
        if (p_ru != save_ru)
            status_redraw_all();    /* redraw to draw the ruler */
-# endif
        p_ru = save_ru;
 #endif
 #ifdef FEAT_RIGHTLEFT
index 8f7255d8ae7c6dbbf2c3084e94d95ab12eeff489..ecd70dced93aa2f3eeb0925de52033e5babea1d6 100644 (file)
@@ -460,9 +460,7 @@ static char *(p_dy_values[]) = {"lastline", "truncate", "uhex", NULL};
 #define DY_TRUNCATE            0x002
 #define DY_UHEX                        0x004
 EXTERN int     p_ed;           /* 'edcompatible' */
-#ifdef FEAT_WINDOWS
 EXTERN char_u  *p_ead;         /* 'eadirection' */
-#endif
 EXTERN int     p_ea;           /* 'equalalways' */
 EXTERN char_u  *p_ep;          /* 'equalprg' */
 EXTERN int     p_eb;           /* 'errorbells' */
@@ -551,9 +549,7 @@ EXTERN char_u       *p_gtl;         /* 'guitablabel' */
 EXTERN char_u  *p_gtt;         /* 'guitabtooltip' */
 #endif
 EXTERN char_u  *p_hf;          /* 'helpfile' */
-#ifdef FEAT_WINDOWS
 EXTERN long    p_hh;           /* 'helpheight' */
-#endif
 #ifdef FEAT_MULTI_LANG
 EXTERN char_u  *p_hlg;         /* 'helplang' */
 #endif
@@ -611,10 +607,8 @@ EXTERN long        p_linespace;    /* 'linespace' */
 #ifdef FEAT_LISP
 EXTERN char_u  *p_lispwords;   /* 'lispwords' */
 #endif
-#ifdef FEAT_WINDOWS
 EXTERN long    p_ls;           /* 'laststatus' */
 EXTERN long    p_stal;         /* 'showtabline' */
-#endif
 EXTERN char_u  *p_lcs;         /* 'listchars' */
 
 EXTERN int     p_lz;           /* 'lazyredraw' */
@@ -705,7 +699,7 @@ EXTERN long p_re;           /* 'regexpengine' */
 EXTERN char_u  *p_rop;         /* 'renderoptions' */
 #endif
 EXTERN long    p_report;       /* 'report' */
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
 EXTERN long    p_pvh;          /* 'previewheight' */
 #endif
 #ifdef WIN3264
@@ -795,19 +789,15 @@ EXTERN long       p_ss;           /* 'sidescroll' */
 EXTERN long    p_siso;         /* 'sidescrolloff' */
 EXTERN int     p_scs;          /* 'smartcase' */
 EXTERN int     p_sta;          /* 'smarttab' */
-#ifdef FEAT_WINDOWS
 EXTERN int     p_sb;           /* 'splitbelow' */
 EXTERN long    p_tpm;          /* 'tabpagemax' */
 # if defined(FEAT_STL_OPT)
 EXTERN char_u  *p_tal;         /* 'tabline' */
 # endif
-#endif
 #ifdef FEAT_SPELL
 EXTERN char_u  *p_sps;         /* 'spellsuggest' */
 #endif
-#ifdef FEAT_WINDOWS
 EXTERN int     p_spr;          /* 'splitright' */
-#endif
 EXTERN int     p_sol;          /* 'startofline' */
 EXTERN char_u  *p_su;          /* 'suffixes' */
 EXTERN char_u  *p_sws;         /* 'swapsync' */
@@ -911,9 +901,7 @@ EXTERN long p_ul;           /* 'undolevels' */
 EXTERN long    p_ur;           /* 'undoreload' */
 EXTERN long    p_uc;           /* 'updatecount' */
 EXTERN long    p_ut;           /* 'updatetime' */
-#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
 EXTERN char_u  *p_fcs;         /* 'fillchar' */
-#endif
 #ifdef FEAT_VIMINFO
 EXTERN char_u  *p_viminfo;     /* 'viminfo' */
 EXTERN char_u  *p_viminfofile; /* 'viminfofile' */
@@ -963,12 +951,10 @@ EXTERN char_u     *p_wim;         /* 'wildmode' */
 #ifdef FEAT_WILDMENU
 EXTERN int     p_wmnu;         /* 'wildmenu' */
 #endif
-#ifdef FEAT_WINDOWS
 EXTERN long    p_wh;           /* 'winheight' */
 EXTERN long    p_wmh;          /* 'winminheight' */
 EXTERN long    p_wmw;          /* 'winminwidth' */
 EXTERN long    p_wiw;          /* 'winwidth' */
-#endif
 #if defined(WIN3264) && defined(FEAT_TERMINAL)
 EXTERN char_u  *p_winptydll;   /* 'winptydll' */
 #endif
@@ -1164,7 +1150,7 @@ enum
 #ifdef FEAT_LINEBREAK
     , WV_NUW
 #endif
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     , WV_PVW
 #endif
 #ifdef FEAT_RIGHTLEFT
@@ -1186,10 +1172,8 @@ enum
 #ifdef FEAT_STL_OPT
     , WV_STL
 #endif
-#ifdef FEAT_WINDOWS
     , WV_WFH
     , WV_WFW
-#endif
     , WV_WRAP
 #ifdef FEAT_SIGNS
     , WV_SCL
index 58e38176c814da14f9b921298989e9db4ea2f391..23e8711906e0360313e68c1fc7ea1191f50bdb67 100644 (file)
@@ -60,7 +60,7 @@ pum_display(
     int                above_row;
     int                below_row;
     int                redo_count = 0;
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     win_T      *pvwin;
 #endif
 
@@ -80,7 +80,7 @@ redo:
 
     row = curwin->w_wrow + W_WINROW(curwin);
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     FOR_ALL_WINDOWS(pvwin)
        if (pvwin->w_p_pvw)
            break;
@@ -156,7 +156,7 @@ redo:
     if (pum_height < 1 || (pum_height == 1 && size > 1))
        return;
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     /* If there is a preview window at the above avoid drawing over it. */
     if (pvwin != NULL && pum_row < above_row && pum_height > above_row)
     {
@@ -551,7 +551,7 @@ pum_set_selected(int n, int repeat)
            }
        }
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        /*
         * Show extra info in the preview window if there is something and
         * 'completeopt' contains "preview".
@@ -715,9 +715,7 @@ pum_undisplay(void)
 {
     pum_array = NULL;
     redraw_all_later(SOME_VALID);
-#ifdef FEAT_WINDOWS
     redraw_tabline = TRUE;
-#endif
     status_redraw_all();
 }
 
index 39eb5b63a29628181b2ae7802971027ba8972b4b..66d33478f242ec74c59e554c63672999f2c59411 100644 (file)
@@ -145,7 +145,6 @@ static char_u       *qf_pop_dir(struct dir_stack_T **);
 static char_u  *qf_guess_filepath(qf_info_T *qi, int qf_idx, char_u *);
 static void    qf_fmt_text(char_u *text, char_u *buf, int bufsize);
 static void    qf_clean_dir_stack(struct dir_stack_T **);
-#ifdef FEAT_WINDOWS
 static int     qf_win_pos_update(qf_info_T *qi, int old_qf_index);
 static int     is_qf_win(win_T *win, qf_info_T *qi);
 static win_T   *qf_find_win(qf_info_T *qi);
@@ -153,7 +152,6 @@ static buf_T        *qf_find_buf(qf_info_T *qi);
 static void    qf_update_buffer(qf_info_T *qi, qfline_T *old_last);
 static void    qf_set_title_var(qf_info_T *qi);
 static void    qf_fill_buffer(qf_info_T *qi, buf_T *buf, qfline_T *old_last);
-#endif
 static char_u  *get_mef_name(void);
 static void    restore_start_dir(char_u *dirname_start);
 static buf_T   *load_dummy_buffer(char_u *fname, char_u *dirname_start, char_u *resulting_dir);
@@ -1165,9 +1163,7 @@ qf_init_ext(
     qf_list_T      *qfl;
     qfstate_T      state;
     qffields_T     fields;
-#ifdef FEAT_WINDOWS
     qfline_T       *old_last = NULL;
-#endif
     int                    adding = FALSE;
     static efm_T    *fmt_first = NULL;
     char_u         *efm;
@@ -1209,10 +1205,8 @@ qf_init_ext(
     {
        /* Adding to existing list, use last entry. */
        adding = TRUE;
-#ifdef FEAT_WINDOWS
        if (qi->qf_lists[qf_idx].qf_count > 0)
            old_last = qi->qf_lists[qf_idx].qf_last;
-#endif
     }
 
     qfl = &qi->qf_lists[qf_idx];
@@ -1339,10 +1333,8 @@ qf_init_end:
     vim_free(fields.pattern);
     vim_free(state.growbuf);
 
-#ifdef FEAT_WINDOWS
     if (qf_idx == qi->qf_curlist)
        qf_update_buffer(qi, old_last);
-#endif
 #ifdef FEAT_MBYTE
     if (state.vc.vc_type != CONV_NONE)
        convert_setup(&state.vc, NULL, NULL);
@@ -2101,7 +2093,6 @@ get_nth_entry(
     return qf_ptr;
 }
 
-#ifdef FEAT_WINDOWS
 /*
  * Find a help window or open one.
  */
@@ -2153,7 +2144,6 @@ jump_to_help_window(qf_info_T *qi, int *opened_window)
 
     return OK;
 }
-#endif
 
 /*
  * jump to a quickfix line
@@ -2181,14 +2171,12 @@ qf_jump(qf_info_T       *qi,
     colnr_T            screen_col;
     colnr_T            char_col;
     char_u             *line;
-#ifdef FEAT_WINDOWS
     char_u             *old_swb = p_swb;
     unsigned           old_swb_flags = swb_flags;
     int                        opened_window = FALSE;
     win_T              *win;
     win_T              *altwin;
     int                        flags;
-#endif
     win_T              *oldwin = curwin;
     int                        print_message = TRUE;
     int                        len;
@@ -2225,7 +2213,6 @@ qf_jump(qf_info_T *qi,
     else if (errornr != 0)     /* go to specified number */
        qf_ptr = get_nth_entry(qi, errornr, qf_ptr, &qf_index);
 
-#ifdef FEAT_WINDOWS
     qi->qf_lists[qi->qf_curlist].qf_index = qf_index;
     if (qf_win_pos_update(qi, old_qf_index))
        /* No need to print the error message if it's visible in the error
@@ -2405,7 +2392,6 @@ win_found:
            }
        }
     }
-#endif
 
     /*
      * If there is a file name,
@@ -2558,19 +2544,15 @@ win_found:
     }
     else
     {
-#ifdef FEAT_WINDOWS
        if (opened_window)
            win_close(curwin, TRUE);    /* Close opened window */
-#endif
        if (qf_ptr != NULL && qf_ptr->qf_fnum != 0)
        {
            /*
             * Couldn't open file, so put index back where it was.  This could
             * happen if the file was readonly and we changed something.
             */
-#ifdef FEAT_WINDOWS
 failed:
-#endif
            qf_ptr = old_qf_ptr;
            qf_index = old_qf_index;
        }
@@ -2581,7 +2563,6 @@ theend:
        qi->qf_lists[qi->qf_curlist].qf_ptr = qf_ptr;
        qi->qf_lists[qi->qf_curlist].qf_index = qf_index;
     }
-#ifdef FEAT_WINDOWS
     if (p_swb != old_swb && opened_window)
     {
        /* Restore old 'switchbuf' value, but not when an autocommand or
@@ -2594,7 +2575,6 @@ theend:
        else
            free_string_option(old_swb);
     }
-#endif
 }
 
 /*
@@ -2820,9 +2800,7 @@ qf_age(exarg_T *eap)
        }
     }
     qf_msg(qi, qi->qf_curlist, "");
-#ifdef FEAT_WINDOWS
     qf_update_buffer(qi, NULL);
-#endif
 }
 
     void
@@ -3001,7 +2979,6 @@ qf_types(int c, int nr)
     return buf;
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * ":cwindow": open the quickfix window if we have errors to display,
  *            close it if not.
@@ -3544,8 +3521,6 @@ qf_fill_buffer(qf_info_T *qi, buf_T *buf, qfline_T *old_last)
     KeyTyped = old_KeyTyped;
 }
 
-#endif /* FEAT_WINDOWS */
-
 /*
  * Return TRUE when using ":vimgrep" for ":grep".
  */
@@ -4421,9 +4396,7 @@ ex_vimgrep(exarg_T *eap)
     qi->qf_lists[qi->qf_curlist].qf_ptr = qi->qf_lists[qi->qf_curlist].qf_start;
     qi->qf_lists[qi->qf_curlist].qf_index = 1;
 
-#ifdef FEAT_WINDOWS
     qf_update_buffer(qi, NULL);
-#endif
 
 #ifdef FEAT_AUTOCMD
     if (au_name != NULL)
@@ -4976,9 +4949,7 @@ qf_add_entries(
     long       lnum;
     int                col, nr;
     int                vcol;
-#ifdef FEAT_WINDOWS
     qfline_T   *old_last = NULL;
-#endif
     int                valid, status;
     int                retval = OK;
     int                did_bufnr_emsg = FALSE;
@@ -4989,11 +4960,9 @@ qf_add_entries(
        qf_new_list(qi, title);
        qf_idx = qi->qf_curlist;
     }
-#ifdef FEAT_WINDOWS
     else if (action == 'a' && qi->qf_lists[qf_idx].qf_count > 0)
        /* Adding to existing list, use last entry. */
        old_last = qi->qf_lists[qf_idx].qf_last;
-#endif
     else if (action == 'r')
     {
        qf_free_items(qi, qf_idx);
@@ -5081,10 +5050,8 @@ qf_add_entries(
            qi->qf_lists[qf_idx].qf_index = 1;
     }
 
-#ifdef FEAT_WINDOWS
     /* Don't update the cursor in quickfix window when appending entries */
     qf_update_buffer(qi, old_last);
-#endif
 
     return retval;
 }
@@ -5754,9 +5721,7 @@ ex_helpgrep(exarg_T *eap)
        /* Darn, some plugin changed the value. */
        free_string_option(save_cpo);
 
-#ifdef FEAT_WINDOWS
     qf_update_buffer(qi, NULL);
-#endif
 
 #ifdef FEAT_AUTOCMD
     if (au_name != NULL)
index 6ce478eccee915cb1aa9843f66d79e9f983ac0b5..d93ce50f3cbc1a0594a9fbe16eebbc78a58ad89f 100644 (file)
@@ -130,9 +130,7 @@ static void copy_text_attr(int off, char_u *buf, int len, int attr);
 #endif
 static int win_line(win_T *, linenr_T, int, int, int nochange, proftime_T *syntax_tm);
 static int char_needs_redraw(int off_from, int off_to, int cols);
-#ifdef FEAT_WINDOWS
 static void draw_vsep_win(win_T *wp, int row);
-#endif
 #ifdef FEAT_STL_OPT
 static void redraw_custom_statusline(win_T *wp);
 #endif
@@ -153,23 +151,15 @@ static void screen_char_2(unsigned off, int row, int col);
 static void screenclear2(void);
 static void lineclear(unsigned off, int width, int attr);
 static void lineinvalid(unsigned off, int width);
-#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
 static int win_do_lines(win_T *wp, int row, int line_count, int mayclear, int del, int clear_attr);
 static void win_rest_invalid(win_T *wp);
 static void msg_pos_mode(void);
 static void recording_mode(int attr);
-#if defined(FEAT_WINDOWS)
 static void draw_tabline(void);
-#endif
-#if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT)
 static int fillchar_status(int *attr, win_T *wp);
-#endif
-#ifdef FEAT_WINDOWS
 static int fillchar_vsep(int *attr);
-#endif
 #ifdef FEAT_STL_OPT
 static void win_redr_custom(win_T *wp, int draw_ruler);
 #endif
@@ -177,10 +167,8 @@ static void win_redr_custom(win_T *wp, int draw_ruler);
 static void win_redr_ruler(win_T *wp, int always);
 #endif
 
-#if defined(FEAT_CLIPBOARD) || defined(FEAT_WINDOWS)
 /* Ugly global: overrule attribute used by screen_char() */
 static int screen_char_attr = 0;
-#endif
 
 #if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME)
 /* Can limit syntax highlight time to 'redrawtime'. */
@@ -289,9 +277,7 @@ redraw_buf_and_status_later(buf_T *buf, int type)
        if (wp->w_buffer == buf)
        {
            redraw_win_later(wp, type);
-#ifdef FEAT_WINDOWS
            wp->w_redr_status = TRUE;
-#endif
        }
     }
 }
@@ -630,19 +616,15 @@ update_screen(int type_arg)
                    else
                    {
                        wp->w_redr_type = NOT_VALID;
-#ifdef FEAT_WINDOWS
                        if (W_WINROW(wp) + wp->w_height + W_STATUS_HEIGHT(wp)
                                <= msg_scrolled)
                            wp->w_redr_status = TRUE;
-#endif
                    }
                }
            }
            if (!no_update)
                redraw_cmdline = TRUE;
-#ifdef FEAT_WINDOWS
            redraw_tabline = TRUE;
-#endif
        }
        msg_scrolled = 0;
        need_wait_return = FALSE;
@@ -697,11 +679,9 @@ update_screen(int type_arg)
                ))
        curwin->w_redr_type = type;
 
-#ifdef FEAT_WINDOWS
     /* Redraw the tab pages line if needed. */
     if (redraw_tabline || type >= NOT_VALID)
        draw_tabline();
-#endif
 
 #ifdef FEAT_SYN_HL
     /*
@@ -712,19 +692,13 @@ update_screen(int type_arg)
     {
        if (wp->w_buffer->b_mod_set)
        {
-# ifdef FEAT_WINDOWS
            win_T       *wwp;
 
            /* Check if we already did this buffer. */
            for (wwp = firstwin; wwp != wp; wwp = wwp->w_next)
                if (wwp->w_buffer == wp->w_buffer)
                    break;
-# endif
-           if (
-# ifdef FEAT_WINDOWS
-                   wwp == wp &&
-# endif
-                   syntax_present(wp))
+           if (wwp == wp && syntax_present(wp))
                syn_stack_apply_changes(wp->w_buffer);
        }
     }
@@ -776,14 +750,12 @@ update_screen(int type_arg)
            win_update(wp);
        }
 
-#ifdef FEAT_WINDOWS
        /* redraw status line after the window to minimize cursor movement */
        if (wp->w_redr_status)
        {
            cursor_off();
            win_redr_status(wp);
        }
-#endif
     }
 #if defined(FEAT_SEARCH_EXTRA)
     end_search_hl();
@@ -794,14 +766,10 @@ update_screen(int type_arg)
        pum_redraw();
 #endif
 
-#ifdef FEAT_WINDOWS
     /* Reset b_mod_set flags.  Going through all windows is probably faster
      * than going through all buffers (there could be many buffers). */
     FOR_ALL_WINDOWS(wp)
        wp->w_buffer->b_mod_set = FALSE;
-#else
-       curbuf->b_mod_set = FALSE;
-#endif
 
     updating_screen = FALSE;
 #ifdef FEAT_GUI
@@ -1038,7 +1006,6 @@ update_debug_sign(buf_T *buf, linenr_T lnum)
     /* update all windows that need updating */
     update_prepare();
 
-# ifdef FEAT_WINDOWS
     FOR_ALL_WINDOWS(wp)
     {
        if (wp->w_redr_type != 0)
@@ -1046,10 +1013,6 @@ update_debug_sign(buf_T *buf, linenr_T lnum)
        if (wp->w_redr_status)
            win_redr_status(wp);
     }
-# else
-    if (curwin->w_redr_type != 0)
-       win_update(curwin);
-# endif
 
     update_finish();
 }
@@ -1080,7 +1043,6 @@ updateWindow(win_T *wp)
 
     win_update(wp);
 
-#ifdef FEAT_WINDOWS
     /* When the screen was cleared redraw the tab pages line. */
     if (redraw_tabline)
        draw_tabline();
@@ -1094,7 +1056,6 @@ updateWindow(win_T *wp)
 # endif
            )
        win_redr_status(wp);
-#endif
 
     update_finish();
 }
@@ -1183,9 +1144,7 @@ win_update(win_T *wp)
 
     if (type == NOT_VALID)
     {
-#ifdef FEAT_WINDOWS
        wp->w_redr_status = TRUE;
-#endif
        wp->w_lines_valid = 0;
     }
 
@@ -1196,7 +1155,6 @@ win_update(win_T *wp)
        return;
     }
 
-#ifdef FEAT_WINDOWS
     /* Window is zero-width: Only need to draw the separator. */
     if (wp->w_width == 0)
     {
@@ -1205,7 +1163,6 @@ win_update(win_T *wp)
        wp->w_redr_type = 0;
        return;
     }
-#endif
 
 #ifdef FEAT_TERMINAL
     /* If this window contains a terminal, redraw works completely differently.
@@ -1603,11 +1560,9 @@ win_update(win_T *wp)
                 * then. */
                if (screen_cleared != TRUE)
                    screenclear();
-#ifdef FEAT_WINDOWS
                /* The screen was cleared, redraw the tab pages line. */
                if (redraw_tabline)
                    draw_tabline();
-#endif
            }
        }
 
@@ -2275,9 +2230,7 @@ win_update(win_T *wp)
     }
     else
     {
-#ifdef FEAT_WINDOWS
        draw_vsep_win(wp, row);
-#endif
        if (eof)                /* we hit the end of the file */
        {
            wp->w_botline = buf->b_ml.ml_line_count + 1;
@@ -3116,7 +3069,7 @@ win_line(
     int                need_showbreak = FALSE; /* overlong line, skipping first x
                                           chars */
 #endif
-#if defined(FEAT_SIGNS) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \
+#if defined(FEAT_SIGNS) || defined(FEAT_QUICKFIX) \
        || defined(FEAT_SYN_HL) || defined(FEAT_DIFF)
 # define LINE_ATTR
     int                line_attr = 0;          /* attribute for the whole line */
@@ -3450,7 +3403,7 @@ win_line(
     if (v != 0)
        line_attr = sign_get_attr((int)v, TRUE);
 # endif
-# if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)
+# if defined(FEAT_QUICKFIX)
     /* Highlight the current line in the quickfix window. */
     if (bt_quickfix(wp->w_buffer) && qf_current_entry(wp) == lnum)
        line_attr = HL_ATTR(HLF_QFL);
@@ -5840,9 +5793,7 @@ win_line(
                    )
            {
                win_draw_end(wp, '@', ' ', row, wp->w_height, HLF_AT);
-#ifdef FEAT_WINDOWS
                draw_vsep_win(wp, row);
-#endif
                row = endrow;
            }
 
@@ -5857,10 +5808,7 @@ win_line(
 #ifdef FEAT_DIFF
                     && filler_todo <= 0
 #endif
-#ifdef FEAT_WINDOWS
-                    && W_WIDTH(wp) == Columns
-#endif
-                    )
+                    && W_WIDTH(wp) == Columns)
            {
                /* Remember that the line wraps, used for modeless copy. */
                LineWraps[screen_row - 1] = TRUE;
@@ -6060,9 +6008,7 @@ screen_line(
     unsigned       max_off_to;
 #endif
     int                    col = 0;
-#if defined(FEAT_GUI) || defined(UNIX) || defined(FEAT_WINDOWS)
     int                    hl;
-#endif
     int                    force = FALSE;      /* force update rest of the line */
     int                    redraw_this         /* bool: does character need redraw? */
 #ifdef FEAT_GUI
@@ -6399,16 +6345,13 @@ screen_line(
 #endif
            screen_fill(row, row + 1, col + coloff, clear_width + coloff,
                                                                 ' ', ' ', 0);
-#ifdef FEAT_WINDOWS
            off_to += clear_width - col;
            col = clear_width;
-#endif
        }
     }
 
     if (clear_width > 0)
     {
-#ifdef FEAT_WINDOWS
        /* For a window that's left of another, draw the separator char. */
        if (col + coloff < Columns)
        {
@@ -6416,15 +6359,15 @@ screen_line(
 
            c = fillchar_vsep(&hl);
            if (ScreenLines[off_to] != (schar_T)c
-# ifdef FEAT_MBYTE
+#ifdef FEAT_MBYTE
                    || (enc_utf8 && (int)ScreenLinesUC[off_to]
                                                       != (c >= 0x80 ? c : 0))
-# endif
+#endif
                    || ScreenAttrs[off_to] != hl)
            {
                ScreenLines[off_to] = c;
                ScreenAttrs[off_to] = hl;
-# ifdef FEAT_MBYTE
+#ifdef FEAT_MBYTE
                if (enc_utf8)
                {
                    if (c >= 0x80)
@@ -6435,12 +6378,11 @@ screen_line(
                    else
                        ScreenLinesUC[off_to] = 0;
                }
-# endif
+#endif
                screen_char(off_to, row, col + coloff);
            }
        }
        else
-#endif
            LineWraps[row] = FALSE;
     }
 }
@@ -6465,7 +6407,6 @@ rl_mirror(char_u *str)
 }
 #endif
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * mark all status lines for redraw; used after first :cd
  */
@@ -6512,9 +6453,8 @@ redraw_statuslines(void)
     if (redraw_tabline)
        draw_tabline();
 }
-#endif
 
-#if (defined(FEAT_WILDMENU) && defined(FEAT_WINDOWS)) || defined(PROTO)
+#if defined(FEAT_WILDMENU) || defined(PROTO)
 /*
  * Redraw all status lines at the bottom of frame "frp".
  */
@@ -6538,7 +6478,6 @@ win_redraw_last_status(frame_T *frp)
 }
 #endif
 
-#ifdef FEAT_WINDOWS
 /*
  * Draw the verticap separator right of window "wp" starting with line "row".
  */
@@ -6557,7 +6496,6 @@ draw_vsep_win(win_T *wp, int row)
                c, ' ', hl);
     }
 }
-#endif
 
 #ifdef FEAT_WILDMENU
 static int status_match_len(expand_T *xp, char_u *s);
@@ -6831,16 +6769,11 @@ win_redr_status_matches(
        screen_fill(row, row + 1, clen, (int)Columns, fillchar, fillchar, attr);
     }
 
-#ifdef FEAT_WINDOWS
     win_redraw_last_status(topframe);
-#else
-    lastwin->w_redr_status = TRUE;
-#endif
     vim_free(buf);
 }
 #endif
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Redraw the status line of window wp.
  *
@@ -7060,9 +6993,7 @@ stl_connected(win_T *wp)
     return FALSE;
 }
 
-#endif /* FEAT_WINDOWS */
 
-#if defined(FEAT_WINDOWS) || defined(FEAT_STL_OPT) || defined(PROTO)
 /*
  * Get the value to show for the language mappings, active 'keymap'.
  */
@@ -7110,7 +7041,6 @@ get_keymap_str(
     }
     return buf[0] != NUL;
 }
-#endif
 
 #if defined(FEAT_STL_OPT) || defined(PROTO)
 /*
@@ -7181,19 +7111,11 @@ win_redr_custom(
                if (*stl++ != '(')
                    stl = p_ruf;
            }
-#ifdef FEAT_WINDOWS
            col = ru_col - (Columns - W_WIDTH(wp));
            if (col < (W_WIDTH(wp) + 1) / 2)
                col = (W_WIDTH(wp) + 1) / 2;
-#else
-           col = ru_col;
-           if (col > (Columns + 1) / 2)
-               col = (Columns + 1) / 2;
-#endif
            maxwidth = W_WIDTH(wp) - col;
-#ifdef FEAT_WINDOWS
            if (!wp->w_status_height)
-#endif
            {
                row = Rows - 1;
                --maxwidth;     /* writing in last column may cause scrolling */
@@ -7217,9 +7139,7 @@ win_redr_custom(
 # endif
        }
 
-#ifdef FEAT_WINDOWS
        col += W_WINCOL(wp);
-#endif
     }
 
     if (maxwidth <= 0)
@@ -7277,18 +7197,16 @@ win_redr_custom(
            curattr = attr;
        else if (hltab[n].userhl < 0)
            curattr = syn_id2attr(-hltab[n].userhl);
-#ifdef FEAT_WINDOWS
-# ifdef FEAT_TERMINAL
+#ifdef FEAT_TERMINAL
        else if (wp != NULL && wp != curwin && bt_terminal(wp->w_buffer)
                                                   && wp->w_status_height != 0)
            curattr = highlight_stltermnc[hltab[n].userhl - 1];
        else if (wp != NULL && bt_terminal(wp->w_buffer)
                                                   && wp->w_status_height != 0)
            curattr = highlight_stlterm[hltab[n].userhl - 1];
-# endif
+#endif
        else if (wp != NULL && wp != curwin && wp->w_status_height != 0)
            curattr = highlight_stlnc[hltab[n].userhl - 1];
-#endif
        else
            curattr = highlight_user[hltab[n].userhl - 1];
     }
@@ -8326,11 +8244,9 @@ screen_char(unsigned off, int row, int col)
     /*
      * Stop highlighting first, so it's easier to move the cursor.
      */
-#if defined(FEAT_CLIPBOARD) || defined(FEAT_WINDOWS)
     if (screen_char_attr != 0)
        attr = screen_char_attr;
     else
-#endif
        attr = ScreenAttrs[off];
     if (screen_attr != attr)
        screen_stop_highlight();
@@ -8403,7 +8319,6 @@ screen_char_2(unsigned off, int row, int col)
 }
 #endif
 
-#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.
@@ -8455,9 +8370,7 @@ screen_draw_rectangle(
     }
     screen_char_attr = 0;
 }
-#endif
 
-#ifdef FEAT_WINDOWS
 /*
  * Redraw the characters for a vertically split window.
  */
@@ -8483,7 +8396,6 @@ redraw_block(int row, int end, win_T *wp)
     }
     screen_draw_rectangle(row, col, end - row, width, FALSE);
 }
-#endif
 
 /*
  * Fill the screen from 'start_row' to 'end_row', from 'start_col' to 'end_col'
@@ -8742,10 +8654,8 @@ screenalloc(int doclear)
     sattr_T        *new_ScreenAttrs;
     unsigned       *new_LineOffset;
     char_u         *new_LineWraps;
-#ifdef FEAT_WINDOWS
     short          *new_TabPageIdxs;
     tabpage_T      *tp;
-#endif
     static int     entered = FALSE;            /* avoid recursiveness */
     static int     done_outofmem_msg = FALSE;  /* did outofmem message */
 #ifdef FEAT_AUTOCMD
@@ -8830,18 +8740,14 @@ retry:
     new_LineOffset = (unsigned *)lalloc((long_u)(
                                         Rows * sizeof(unsigned)), FALSE);
     new_LineWraps = (char_u *)lalloc((long_u)(Rows * sizeof(char_u)), FALSE);
-#ifdef FEAT_WINDOWS
     new_TabPageIdxs = (short *)lalloc((long_u)(Columns * sizeof(short)), FALSE);
-#endif
 
     FOR_ALL_TAB_WINDOWS(tp, wp)
     {
        if (win_alloc_lines(wp) == FAIL)
        {
            outofmem = TRUE;
-#ifdef FEAT_WINDOWS
            goto give_up;
-#endif
        }
     }
 #ifdef FEAT_AUTOCMD
@@ -8849,9 +8755,7 @@ retry:
                                        && win_alloc_lines(aucmd_win) == FAIL)
        outofmem = TRUE;
 #endif
-#ifdef FEAT_WINDOWS
 give_up:
-#endif
 
 #ifdef FEAT_MBYTE
     for (i = 0; i < p_mco; ++i)
@@ -8866,9 +8770,7 @@ give_up:
            || new_ScreenAttrs == NULL
            || new_LineOffset == NULL
            || new_LineWraps == NULL
-#ifdef FEAT_WINDOWS
            || new_TabPageIdxs == NULL
-#endif
            || outofmem)
     {
        if (ScreenLines != NULL || !done_outofmem_msg)
@@ -8899,10 +8801,8 @@ give_up:
        new_LineOffset = NULL;
        vim_free(new_LineWraps);
        new_LineWraps = NULL;
-#ifdef FEAT_WINDOWS
        vim_free(new_TabPageIdxs);
        new_TabPageIdxs = NULL;
-#endif
     }
     else
     {
@@ -8996,9 +8896,7 @@ give_up:
     ScreenAttrs = new_ScreenAttrs;
     LineOffset = new_LineOffset;
     LineWraps = new_LineWraps;
-#ifdef FEAT_WINDOWS
     TabPageIdxs = new_TabPageIdxs;
-#endif
 
     /* It's important that screen_Rows and screen_Columns reflect the actual
      * size of ScreenLines[].  Set them before calling anything. */
@@ -9065,9 +8963,7 @@ free_screenlines(void)
     vim_free(ScreenAttrs);
     vim_free(LineOffset);
     vim_free(LineWraps);
-#ifdef FEAT_WINDOWS
     vim_free(TabPageIdxs);
-#endif
 }
 
     void
@@ -9126,9 +9022,7 @@ screenclear2(void)
 
     win_rest_invalid(firstwin);
     redraw_cmdline = TRUE;
-#ifdef FEAT_WINDOWS
     redraw_tabline = TRUE;
-#endif
     if (must_redraw == CLEAR)  /* no need to clear again */
        must_redraw = NOT_VALID;
     compute_cmdrow();
@@ -9165,7 +9059,6 @@ lineinvalid(unsigned off, int width)
     (void)vim_memset(ScreenAttrs + off, -1, (size_t)width * sizeof(sattr_T));
 }
 
-#ifdef FEAT_WINDOWS
 /*
  * Copy part of a Screenline for vertically split window "wp".
  */
@@ -9177,7 +9070,7 @@ linecopy(int to, int from, win_T *wp)
 
     mch_memmove(ScreenLines + off_to, ScreenLines + off_from,
            wp->w_width * sizeof(schar_T));
-# ifdef FEAT_MBYTE
+#ifdef FEAT_MBYTE
     if (enc_utf8)
     {
        int     i;
@@ -9191,11 +9084,10 @@ linecopy(int to, int from, win_T *wp)
     if (enc_dbcs == DBCS_JPNU)
        mch_memmove(ScreenLines2 + off_to, ScreenLines2 + off_from,
                wp->w_width * sizeof(schar_T));
-# endif
+#endif
     mch_memmove(ScreenAttrs + off_to, ScreenAttrs + off_from,
            wp->w_width * sizeof(sattr_T));
 }
-#endif
 
 /*
  * Return TRUE if clearing with term string "p" would work.
@@ -9549,7 +9441,6 @@ win_ins_lines(
      * messing up those windows, better just redraw.
      */
     did_delete = FALSE;
-#ifdef FEAT_WINDOWS
     if (wp->w_next != NULL || wp->w_status_height)
     {
        if (screen_del_lines(0, W_WINROW(wp) + wp->w_height - line_count,
@@ -9558,15 +9449,12 @@ win_ins_lines(
        else if (wp->w_next)
            return FAIL;
     }
-#endif
     /*
      * if no lines deleted, blank the lines that will end up below the window
      */
     if (!did_delete)
     {
-#ifdef FEAT_WINDOWS
        wp->w_redr_status = TRUE;
-#endif
        redraw_cmdline = TRUE;
        nextrow = W_WINROW(wp) + wp->w_height + W_STATUS_HEIGHT(wp);
        lastrow = nextrow + line_count;
@@ -9583,9 +9471,7 @@ win_ins_lines(
            /* deletion will have messed up other windows */
        if (did_delete)
        {
-#ifdef FEAT_WINDOWS
            wp->w_redr_status = TRUE;
-#endif
            win_rest_invalid(W_NEXT(wp));
        }
        return FAIL;
@@ -9626,7 +9512,6 @@ win_del_lines(
                                   (int)Rows, FALSE, clear_attr, NULL) == FAIL)
        return FAIL;
 
-#ifdef FEAT_WINDOWS
     /*
      * If there are windows or status lines below, try to put them at the
      * correct place. If we can't do that, they have to be redrawn.
@@ -9645,7 +9530,6 @@ win_del_lines(
      * command line later.
      */
     else
-#endif
        redraw_cmdline = TRUE;
     return OK;
 }
@@ -9675,11 +9559,7 @@ win_do_lines(
        return FAIL;
 
     /* only a few lines left: redraw is faster */
-    if (mayclear && Rows - line_count < 5
-#ifdef FEAT_WINDOWS
-           && wp->w_width == Columns
-#endif
-           )
+    if (mayclear && Rows - line_count < 5 && wp->w_width == Columns)
     {
        if (!no_win_do_lines_ins)
            screenclear();          /* will set wp->w_lines_valid to 0 */
@@ -9714,15 +9594,9 @@ win_do_lines(
      * a character in the lower right corner of the scroll region may cause a
      * scroll-up .
      */
-    if (scroll_region
-#ifdef FEAT_WINDOWS
-           || W_WIDTH(wp) != Columns
-#endif
-           )
+    if (scroll_region || W_WIDTH(wp) != Columns)
     {
-#ifdef FEAT_WINDOWS
        if (scroll_region && (wp->w_width == Columns || *T_CSV != NUL))
-#endif
            scroll_region_set(wp, row);
        if (del)
            retval = screen_del_lines(W_WINROW(wp) + row, 0, line_count,
@@ -9730,17 +9604,13 @@ win_do_lines(
        else
            retval = screen_ins_lines(W_WINROW(wp) + row, 0, line_count,
                                           wp->w_height - row, clear_attr, wp);
-#ifdef FEAT_WINDOWS
        if (scroll_region && (wp->w_width == Columns || *T_CSV != NUL))
-#endif
            scroll_region_reset();
        return retval;
     }
 
-#ifdef FEAT_WINDOWS
     if (wp->w_next != NULL && p_tf) /* don't delete/insert on fast terminal */
        return FAIL;
-#endif
 
     return MAYBE;
 }
@@ -9751,17 +9621,11 @@ win_do_lines(
     static void
 win_rest_invalid(win_T *wp)
 {
-#ifdef FEAT_WINDOWS
     while (wp != NULL)
-#else
-    if (wp != NULL)
-#endif
     {
        redraw_win_later(wp, NOT_VALID);
-#ifdef FEAT_WINDOWS
        wp->w_redr_status = TRUE;
        wp = wp->w_next;
-#endif
     }
     redraw_cmdline = TRUE;
 }
@@ -9856,12 +9720,9 @@ screen_ins_lines(
      * exists.
      */
     result_empty = (row + line_count >= end);
-#ifdef FEAT_WINDOWS
     if (wp != NULL && wp->w_width != Columns && *T_CSV == NUL)
        type = USE_REDRAW;
-    else
-#endif
-    if (can_clear(T_CD) && result_empty)
+    else if (can_clear(T_CD) && result_empty)
        type = USE_T_CD;
     else if (*T_CAL != NUL && (line_count > 1 || *T_AL == NUL))
        type = USE_T_CAL;
@@ -9897,11 +9758,7 @@ screen_ins_lines(
 #ifdef FEAT_CLIPBOARD
     /* Remove a modeless selection when inserting lines halfway the screen
      * or not the full width of the screen. */
-    if (off + row > 0
-# ifdef FEAT_WINDOWS
-           || (wp != NULL && wp->w_width != Columns)
-# endif
-       )
+    if (off + row > 0 || (wp != NULL && wp->w_width != Columns))
        clip_clear_selection(&clip_star);
     else
        clip_scroll_selection(-line_count);
@@ -9926,7 +9783,6 @@ screen_ins_lines(
     end += off;
     for (i = 0; i < line_count; ++i)
     {
-#ifdef FEAT_WINDOWS
        if (wp != NULL && wp->w_width != Columns)
        {
            /* need to copy part of a line */
@@ -9942,7 +9798,6 @@ screen_ins_lines(
            LineWraps[j] = FALSE;
        }
        else
-#endif
        {
            j = end - 1 - i;
            temp = LineOffset[j];
@@ -9965,13 +9820,10 @@ screen_ins_lines(
     if (clear_attr != 0)
        screen_start_highlight(clear_attr);
 
-#ifdef FEAT_WINDOWS
     /* redraw the characters */
     if (type == USE_REDRAW)
        redraw_block(row, end, wp);
-    else
-#endif
-       if (type == USE_T_CAL)
+    else if (type == USE_T_CAL)
     {
        term_append_lines(line_count);
        screen_start();         /* don't know where cursor is now */
@@ -10081,12 +9933,9 @@ screen_del_lines(
      * 5. Use T_DL (delete line) if it exists.
      * 6. redraw the characters from ScreenLines[].
      */
-#ifdef FEAT_WINDOWS
     if (wp != NULL && wp->w_width != Columns && *T_CSV == NUL)
        type = USE_REDRAW;
-    else
-#endif
-    if (can_clear(T_CD) && result_empty)
+    else if (can_clear(T_CD) && result_empty)
        type = USE_T_CD;
 #if defined(__BEOS__) && defined(BEOS_DR8)
     /*
@@ -10113,10 +9962,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_WINDOWS
-           && (wp == NULL || wp->w_width == Columns)
-#endif
-           )
+           && (wp == NULL || wp->w_width == Columns))
        type = USE_T_CE;
     else if (*T_DL != NUL && can_delete)
        type = USE_T_DL;
@@ -10128,11 +9974,7 @@ screen_del_lines(
 #ifdef FEAT_CLIPBOARD
     /* Remove a modeless selection when deleting lines halfway the screen or
      * not the full width of the screen. */
-    if (off + row > 0
-# ifdef FEAT_WINDOWS
-           || (wp != NULL && wp->w_width != Columns)
-# endif
-       )
+    if (off + row > 0 || (wp != NULL && wp->w_width != Columns))
        clip_clear_selection(&clip_star);
     else
        clip_scroll_selection(line_count);
@@ -10164,7 +10006,6 @@ screen_del_lines(
     end += off;
     for (i = 0; i < line_count; ++i)
     {
-#ifdef FEAT_WINDOWS
        if (wp != NULL && wp->w_width != Columns)
        {
            /* need to copy part of a line */
@@ -10180,7 +10021,6 @@ screen_del_lines(
            LineWraps[j] = FALSE;
        }
        else
-#endif
        {
            /* whole width, moving the line pointers is faster */
            j = row + i;
@@ -10204,13 +10044,10 @@ screen_del_lines(
     if (clear_attr != 0)
        screen_start_highlight(clear_attr);
 
-#ifdef FEAT_WINDOWS
     /* redraw the characters */
     if (type == USE_REDRAW)
        redraw_block(row, end, wp);
-    else
-#endif
-       if (type == USE_T_CD)   /* delete the lines */
+    else if (type == USE_T_CD) /* delete the lines */
     {
        windgoto(cursor_row, 0);
        out_str(T_CD);
@@ -10487,11 +10324,7 @@ showmode(void)
 
     /* If the last window has no status line, the ruler is after the mode
      * message and must be redrawn */
-    if (redrawing()
-# ifdef FEAT_WINDOWS
-           && lastwin->w_status_height == 0
-# endif
-       )
+    if (redrawing() && lastwin->w_status_height == 0)
        win_redr_ruler(lastwin, TRUE);
 #endif
     redraw_cmdline = FALSE;
@@ -10551,7 +10384,6 @@ recording_mode(int attr)
     }
 }
 
-#if defined(FEAT_WINDOWS)
 /*
  * Draw the tab pages line at the top of the Vim window.
  */
@@ -10754,9 +10586,7 @@ get_trans_bufname(buf_T *buf)
        home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE);
     trans_characters(NameBuff, MAXPATHL);
 }
-#endif
 
-#if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT)
 /*
  * Get the character to use in a status line.  Get its attributes in "*attr".
  */
@@ -10802,9 +10632,7 @@ fillchar_status(int *attr, win_T *wp)
        return '^';
     return '=';
 }
-#endif
 
-#ifdef FEAT_WINDOWS
 /*
  * Get the character to use in a separator between vertically split windows.
  * Get its attributes in "*attr".
@@ -10818,7 +10646,6 @@ fillchar_vsep(int *attr)
     else
        return fill_vert;
 }
-#endif
 
 /*
  * Return TRUE if redrawing should currently be done.
@@ -10856,14 +10683,12 @@ showruler(int always)
 #ifdef FEAT_INS_EXPAND
     if (pum_visible())
     {
-# ifdef FEAT_WINDOWS
        /* Don't redraw right now, do it later. */
        curwin->w_redr_status = TRUE;
-# endif
        return;
     }
 #endif
-#if defined(FEAT_STL_OPT) && defined(FEAT_WINDOWS)
+#if defined(FEAT_STL_OPT)
     if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height)
     {
        redraw_custom_statusline(curwin);
@@ -10883,11 +10708,9 @@ showruler(int always)
        )
        maketitle();
 #endif
-#ifdef FEAT_WINDOWS
     /* Redraw the tab pages line if needed. */
     if (redraw_tabline)
        draw_tabline();
-#endif
 }
 
 #ifdef FEAT_CMDL_INFO
@@ -10904,17 +10727,9 @@ win_redr_ruler(win_T *wp, int always)
     int                i;
     size_t     len;
     int                o;
-#ifdef FEAT_WINDOWS
     int                this_ru_col;
     int                off = 0;
     int                width = Columns;
-# define WITH_OFF(x) x
-# define WITH_WIDTH(x) x
-#else
-# define WITH_OFF(x) 0
-# define WITH_WIDTH(x) Columns
-# define this_ru_col ru_col
-#endif
 
     /* If 'ruler' off or redrawing disabled, don't do anything */
     if (!p_ru)
@@ -10930,9 +10745,7 @@ win_redr_ruler(win_T *wp, int always)
 #ifdef FEAT_INS_EXPAND
     /* Don't draw the ruler while doing insert-completion, it might overwrite
      * the (long) mode message. */
-# ifdef FEAT_WINDOWS
     if (wp == lastwin && lastwin->w_status_height == 0)
-# endif
        if (edit_submode != NULL)
            return;
     /* Don't draw the ruler when the popup menu is visible, it may overlap. */
@@ -10982,7 +10795,6 @@ win_redr_ruler(win_T *wp, int always)
            || empty_line != wp->w_ru_empty)
     {
        cursor_off();
-#ifdef FEAT_WINDOWS
        if (wp->w_status_height)
        {
            row = W_WINROW(wp) + wp->w_height;
@@ -10991,15 +10803,12 @@ win_redr_ruler(win_T *wp, int always)
            width = W_WIDTH(wp);
        }
        else
-#endif
        {
            row = Rows - 1;
            fillchar = ' ';
            attr = 0;
-#ifdef FEAT_WINDOWS
            width = Columns;
            off = 0;
-#endif
        }
 
        /* In list mode virtcol needs to be recomputed */
@@ -11032,23 +10841,19 @@ win_redr_ruler(win_T *wp, int always)
        i = (int)STRLEN(buffer);
        get_rel_pos(wp, buffer + i + 1, RULER_BUF_LEN - i - 1);
        o = i + vim_strsize(buffer + i + 1);
-#ifdef FEAT_WINDOWS
        if (wp->w_status_height == 0)   /* can't use last char of screen */
-#endif
            ++o;
-#ifdef FEAT_WINDOWS
        this_ru_col = ru_col - (Columns - width);
        if (this_ru_col < 0)
            this_ru_col = 0;
-#endif
        /* Never use more than half the window/screen width, leave the other
         * half for the filename. */
-       if (this_ru_col < (WITH_WIDTH(width) + 1) / 2)
-           this_ru_col = (WITH_WIDTH(width) + 1) / 2;
-       if (this_ru_col + o < WITH_WIDTH(width))
+       if (this_ru_col < (width + 1) / 2)
+           this_ru_col = (width + 1) / 2;
+       if (this_ru_col + o < width)
        {
            /* need at least 3 chars left for get_rel_pos() + NUL */
-           while (this_ru_col + o < WITH_WIDTH(width) && RULER_BUF_LEN > i + 4)
+           while (this_ru_col + o < width && RULER_BUF_LEN > i + 4)
            {
 #ifdef FEAT_MBYTE
                if (has_mbyte)
@@ -11068,7 +10873,7 @@ win_redr_ruler(win_T *wp, int always)
            for (i = 0; buffer[i] != NUL; i += (*mb_ptr2len)(buffer + i))
            {
                o += (*mb_ptr2cells)(buffer + i);
-               if (this_ru_col + o > WITH_WIDTH(width))
+               if (this_ru_col + o > width)
                {
                    buffer[i] = NUL;
                    break;
@@ -11077,14 +10882,14 @@ win_redr_ruler(win_T *wp, int always)
        }
        else
 #endif
-       if (this_ru_col + (int)STRLEN(buffer) > WITH_WIDTH(width))
-           buffer[WITH_WIDTH(width) - this_ru_col] = NUL;
+       if (this_ru_col + (int)STRLEN(buffer) > width)
+           buffer[width - this_ru_col] = NUL;
 
-       screen_puts(buffer, row, this_ru_col + WITH_OFF(off), attr);
+       screen_puts(buffer, row, this_ru_col + off, attr);
        i = redraw_cmdline;
        screen_fill(row, row + 1,
-               this_ru_col + WITH_OFF(off) + (int)STRLEN(buffer),
-               (int)(WITH_OFF(off) + WITH_WIDTH(width)),
+               this_ru_col + off + (int)STRLEN(buffer),
+               (int)(off + width),
                fillchar, fillchar, attr);
        /* don't redraw the cmdline because of showing the ruler */
        redraw_cmdline = i;
index 79cd50a77bc0cfbfec4ffb993be69823ec41dd8d..39e353c37623528e6173f4a381a61b0c1cb2b88d 100644 (file)
@@ -4906,7 +4906,7 @@ find_pattern_in_path(
     char_u     *already = NULL;
     char_u     *startp = NULL;
     char_u     *inc_opt = NULL;
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     win_T      *curwin_save = NULL;
 #endif
 
@@ -5385,7 +5385,7 @@ search_line:
            {
                found = TRUE;
                if (depth == -1 && lnum == curwin->w_cursor.lnum
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                                                      && g_do_tagpreview == 0
 #endif
                                                      )
@@ -5402,7 +5402,7 @@ search_line:
 #ifdef FEAT_GUI
                    need_mouse_correct = TRUE;
 #endif
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                    /* ":psearch" uses the preview window */
                    if (g_do_tagpreview != 0)
                    {
@@ -5412,16 +5412,14 @@ search_line:
 #endif
                    if (action == ACTION_SPLIT)
                    {
-#ifdef FEAT_WINDOWS
                        if (win_split(0, 0) == FAIL)
-#endif
                            break;
                        RESET_BINDING(curwin);
                    }
                    if (depth == -1)
                    {
                        /* match in current file */
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                        if (g_do_tagpreview != 0)
                        {
                            if (!GETFILE_SUCCESS(getfile(
@@ -5452,7 +5450,7 @@ search_line:
                    curwin->w_set_curswant = TRUE;
                }
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                if (g_do_tagpreview != 0
                           && curwin != curwin_save && win_valid(curwin_save))
                {
index 2742997c2cf34303a9b5b0bdc822799f3374f0eb..eb1b9fb6c88b223648b6fcc5303cd8cbf2406c90 100644 (file)
@@ -2920,9 +2920,7 @@ spell_reload(void)
                if (wp->w_p_spell)
                {
                    (void)did_set_spelllang(wp);
-# ifdef FEAT_WINDOWS
                    break;
-# endif
                }
        }
     }
index 772b4e706428558d12daf5b4b84bebc2a8f54cb5..18a047c519ef2110dcb60d04cf92e6cccc5b8d1d 100644 (file)
@@ -205,13 +205,11 @@ typedef struct
     long       wo_nuw;
 # define w_p_nuw w_onebuf_opt.wo_nuw   /* 'numberwidth' */
 #endif
-#if defined(FEAT_WINDOWS)
     int                wo_wfh;
 # define w_p_wfh w_onebuf_opt.wo_wfh   /* 'winfixheight' */
     int                wo_wfw;
 # define w_p_wfw w_onebuf_opt.wo_wfw   /* 'winfixwidth' */
-#endif
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     int                wo_pvw;
 # define w_p_pvw w_onebuf_opt.wo_pvw   /* 'previewwindow' */
 #endif
@@ -570,10 +568,8 @@ typedef struct
 # ifdef FEAT_BROWSE_CMD
     int                browse;                 /* TRUE to invoke file dialog */
 # endif
-# ifdef FEAT_WINDOWS
     int                split;                  /* flags for win_split() */
     int                tab;                    /* > 0 when ":tab" was used */
-# endif
 # if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
     int                confirm;                /* TRUE to invoke yes/no dialog */
 # endif
@@ -728,11 +724,7 @@ typedef struct argentry
     int                ae_fnum;        /* buffer number with expanded file name */
 } aentry_T;
 
-#ifdef FEAT_WINDOWS
-# define ALIST(win) (win)->w_alist
-#else
-# define ALIST(win) (&global_alist)
-#endif
+#define ALIST(win)     (win)->w_alist
 #define GARGLIST       ((aentry_T *)global_alist.al_ga.ga_data)
 #define ARGLIST                ((aentry_T *)ALIST(curwin)->al_ga.ga_data)
 #define WARGLIST(wp)   ((aentry_T *)ALIST(wp)->al_ga.ga_data)
@@ -2531,10 +2523,8 @@ typedef struct w_line
 struct frame_S
 {
     char       fr_layout;      /* FR_LEAF, FR_COL or FR_ROW */
-#ifdef FEAT_WINDOWS
     int                fr_width;
     int                fr_newwidth;    /* new width used in win_equal_rec() */
-#endif
     int                fr_height;
     int                fr_newheight;   /* new height used in win_equal_rec() */
     frame_T    *fr_parent;     /* containing frame or NULL */
@@ -2637,10 +2627,8 @@ struct window_S
     synblock_T *w_s;               /* for :ownsyntax */
 #endif
 
-#ifdef FEAT_WINDOWS
     win_T      *w_prev;            /* link to previous window */
     win_T      *w_next;            /* link to next window */
-#endif
 #ifdef FEAT_AUTOCMD
     int                w_closing;          /* window is being closed, don't let
                                       autocommands close it too. */
@@ -2696,12 +2684,9 @@ struct window_S
      * Layout of the window in the screen.
      * May need to add "msg_scrolled" to "w_winrow" in rare situations.
      */
-#ifdef FEAT_WINDOWS
     int                w_winrow;           /* first row of window in screen */
-#endif
     int                w_height;           /* number of rows in window, excluding
                                       status/command line(s) */
-#ifdef FEAT_WINDOWS
     int                w_status_height;    /* number of status lines (0 or 1) */
     int                w_wincol;           /* Leftmost column of window in screen.
                                       use W_WINCOL() */
@@ -2709,8 +2694,6 @@ struct window_S
                                       use W_WIDTH() */
     int                w_vsep_width;       /* Number of separator columns (0 or 1).
                                       use W_VSEP_WIDTH() */
-#endif
-
     /*
      * === start of cached values ====
      */
@@ -2792,9 +2775,7 @@ struct window_S
                                       w_redr_type is REDRAW_TOP */
     linenr_T   w_redraw_top;       /* when != 0: first line needing redraw */
     linenr_T   w_redraw_bot;       /* when != 0: last line needing redraw */
-#ifdef FEAT_WINDOWS
     int                w_redr_status;      /* if TRUE status line must be redrawn */
-#endif
 
 #ifdef FEAT_CMDL_INFO
     /* remember what is shown in the ruler for this window (if 'ruler' set) */
@@ -2810,9 +2791,7 @@ struct window_S
 
     int                w_alt_fnum;         /* alternate file (for # and CTRL-^) */
 
-#ifdef FEAT_WINDOWS
     alist_T    *w_alist;           /* pointer to arglist for this window */
-#endif
     int                w_arg_idx;          /* current index in argument list (can be
                                       out of range!) */
     int                w_arg_idx_invalid;  /* editing another file than w_arg_idx */
@@ -3346,10 +3325,8 @@ typedef struct
 #ifdef FEAT_EVAL
     int                use_debug_break_level;
 #endif
-#ifdef FEAT_WINDOWS
     int                window_count;           /* number of windows to use */
     int                window_layout;          /* 0, WIN_HOR, WIN_VER or WIN_TABS */
-#endif
 
 #ifdef FEAT_CLIENTSERVER
     int                serverArg;              /* TRUE when argument for a server */
index ab2b63e3df28a2176e6472de44dbb3d7d852e6ae..c6e01562e44a3597d7e5a12c679ee5559e4e139c 100644 (file)
@@ -6887,10 +6887,8 @@ static char *(highlight_init_both[]) = {
     CENT("StatusLineNC term=reverse cterm=reverse",
         "StatusLineNC term=reverse cterm=reverse gui=reverse"),
     "default link EndOfBuffer NonText",
-#ifdef FEAT_WINDOWS
     CENT("VertSplit term=reverse cterm=reverse",
         "VertSplit term=reverse cterm=reverse gui=reverse"),
-#endif
 #ifdef FEAT_CLIPBOARD
     CENT("VisualNOS term=underline,bold cterm=underline,bold",
         "VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold"),
@@ -6903,12 +6901,10 @@ static char *(highlight_init_both[]) = {
     CENT("PmenuSbar ctermbg=Grey",
         "PmenuSbar ctermbg=Grey guibg=Grey"),
 #endif
-#ifdef FEAT_WINDOWS
     CENT("TabLineSel term=bold cterm=bold",
         "TabLineSel term=bold cterm=bold gui=bold"),
     CENT("TabLineFill term=reverse cterm=reverse",
         "TabLineFill term=reverse cterm=reverse gui=reverse"),
-#endif
 #ifdef FEAT_GUI
     "Cursor guibg=fg guifg=bg",
     "lCursor guibg=fg guifg=bg", /* should be different, but what? */
@@ -6979,10 +6975,8 @@ static char *(highlight_init_light[]) = {
     CENT("DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan",
         "DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan"),
 #endif
-#ifdef FEAT_WINDOWS
     CENT("TabLine term=underline cterm=underline ctermfg=black ctermbg=LightGrey",
         "TabLine term=underline cterm=underline ctermfg=black ctermbg=LightGrey gui=underline guibg=LightGrey"),
-#endif
 #ifdef FEAT_SYN_HL
     CENT("CursorColumn term=reverse ctermbg=LightGrey",
         "CursorColumn term=reverse ctermbg=LightGrey guibg=Grey90"),
@@ -7073,10 +7067,8 @@ static char *(highlight_init_dark[]) = {
     CENT("DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan",
         "DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan"),
 #endif
-#ifdef FEAT_WINDOWS
     CENT("TabLine term=underline cterm=underline ctermfg=white ctermbg=DarkGrey",
         "TabLine term=underline cterm=underline ctermfg=white ctermbg=DarkGrey gui=underline guibg=DarkGrey"),
-#endif
 #ifdef FEAT_SYN_HL
     CENT("CursorColumn term=reverse ctermbg=DarkGrey",
         "CursorColumn term=reverse ctermbg=DarkGrey guibg=Grey40"),
index 76fbd513e2feed3330822a5bfe84e6658cbc6a84..e39098843f41240dd8c3e3f1b049f594d50c4cfd 100644 (file)
--- a/src/tag.c
+++ b/src/tag.c
@@ -80,7 +80,7 @@ static char_u *topmsg = (char_u *)N_("E556: at top of tag stack");
 
 static char_u  *tagmatchname = NULL;   /* name of last used tag */
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
 /*
  * Tag for preview window is remembered separately, to avoid messing up the
  * normal tagstack.
@@ -188,7 +188,7 @@ do_tag(
     {
        use_tagstack = FALSE;
        new_tag = TRUE;
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        if (g_do_tagpreview != 0)
        {
            vim_free(ptag_entry.tagname);
@@ -199,7 +199,7 @@ do_tag(
     }
     else
     {
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        if (g_do_tagpreview != 0)
            use_tagstack = FALSE;
        else
@@ -217,7 +217,7 @@ do_tag(
 #endif
                    ))
        {
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
            if (g_do_tagpreview != 0)
            {
                if (ptag_entry.tagname != NULL
@@ -273,7 +273,7 @@ do_tag(
        else
        {
            if (
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                    g_do_tagpreview != 0 ? ptag_entry.tagname == NULL :
 #endif
                    tagstacklen == 0)
@@ -356,7 +356,7 @@ do_tag(
 #endif
               )
            {
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                if (g_do_tagpreview != 0)
                {
                    cur_match = ptag_entry.cur_match;
@@ -394,7 +394,7 @@ do_tag(
                /* Save index for when selection is cancelled. */
                prevtagstackidx = tagstackidx;
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                if (g_do_tagpreview != 0)
                {
                    cur_match = ptag_entry.cur_match;
@@ -432,7 +432,7 @@ do_tag(
            }
        }
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        if (g_do_tagpreview != 0)
        {
            if (type != DT_SELECT && type != DT_JUMP)
@@ -487,7 +487,7 @@ do_tag(
         */
        if (use_tagstack)
            name = tagstack[tagstackidx].tagname;
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        else if (g_do_tagpreview != 0)
            name = ptag_entry.tagname;
 #endif
@@ -567,7 +567,7 @@ do_tag(
        {
            if (verbose)
                EMSG2(_("E426: tag not found: %s"), name);
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
            g_do_tagpreview = 0;
 #endif
        }
@@ -614,7 +614,7 @@ do_tag(
                {
                    parse_match(matches[i], &tagp);
                    if (!new_tag && (
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
                                (g_do_tagpreview != 0
                                 && i == ptag_entry.cur_match) ||
 #endif
@@ -968,7 +968,7 @@ do_tag(
                tagstack[tagstackidx].cur_fnum = cur_fnum;
                ++tagstackidx;
            }
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
            else if (g_do_tagpreview != 0)
            {
                ptag_entry.cur_match = cur_match;
@@ -1073,12 +1073,10 @@ end_do_tag:
     /* Only store the new index when using the tagstack and it's valid. */
     if (use_tagstack && tagstackidx <= curwin->w_tagstacklen)
        curwin->w_tagstackidx = tagstackidx;
-#ifdef FEAT_WINDOWS
     postponed_split = 0;       /* don't split next time */
 # ifdef FEAT_QUICKFIX
     g_do_tagpreview = 0;       /* don't do tag preview next time */
 # endif
-#endif
 
 #ifdef FEAT_CSCOPE
     return jumped_to_tag;
@@ -1952,6 +1950,7 @@ parse_line:
 #endif
                                        )
            {
+               vim_memset(&tagp, 0, sizeof(tagp));
                tagp.tagname = lbuf;
 #ifdef FEAT_TAG_ANYWHITE
                tagp.tagname_end = skiptowhite(lbuf);
@@ -1998,17 +1997,17 @@ parse_line:
                    if (*p == ':')
                    {
                        if (tagp.fname == NULL)
-#ifdef FEAT_TAG_ANYWHITE
+# ifdef FEAT_TAG_ANYWHITE
                            tagp.fname = skipwhite(tagp.tagname_end);
-#else
+# else
                            tagp.fname = tagp.tagname_end + 1;
-#endif
+# endif
                        if (       fnamencmp(lbuf, tagp.fname, p - lbuf) == 0
-#ifdef FEAT_TAG_ANYWHITE
+# ifdef FEAT_TAG_ANYWHITE
                                && VIM_ISWHITE(tagp.fname[p - lbuf])
-#else
+# else
                                && tagp.fname[p - lbuf] == TAB
-#endif
+# endif
                                    )
                        {
                            /* found one */
@@ -2619,7 +2618,7 @@ free_tag_stuff(void)
     do_tag(NULL, DT_FREE, 0, 0, 0);
     tag_freematch();
 
-# if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+# if defined(FEAT_QUICKFIX)
     if (ptag_entry.tagname)
     {
        vim_free(ptag_entry.tagname);
@@ -3093,7 +3092,7 @@ jumpto_tag(
 #ifdef FEAT_SEARCH_EXTRA
     int                save_no_hlsearch;
 #endif
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     win_T      *curwin_save = NULL;
 #endif
     char_u     *full_fname = NULL;
@@ -3176,7 +3175,7 @@ jumpto_tag(
     need_mouse_correct = TRUE;
 #endif
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     if (g_do_tagpreview != 0)
     {
        postponed_split = 0;    /* don't split again below */
@@ -3240,9 +3239,9 @@ jumpto_tag(
     {
        /* A :ta from a help file will keep the b_help flag set.  For ":ptag"
         * we need to use the flag from the window where we came from. */
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        if (g_do_tagpreview != 0)
-           keep_help_flag = curwin_save->w_buffer->b_help;
+           keep_help_flag = bt_help(curwin_save->w_buffer);
        else
 #endif
            keep_help_flag = curbuf->b_help;
@@ -3254,9 +3253,7 @@ jumpto_tag(
     if (GETFILE_SUCCESS(getfile_result))       /* got to the right file */
     {
        curwin->w_set_curswant = TRUE;
-#ifdef FEAT_WINDOWS
        postponed_split = 0;
-#endif
 
        save_secure = secure;
        secure = 1;
@@ -3417,7 +3414,7 @@ jumpto_tag(
 #endif
        }
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
        if (g_do_tagpreview != 0
                           && curwin != curwin_save && win_valid(curwin_save))
        {
@@ -3433,17 +3430,15 @@ jumpto_tag(
     else
     {
        --RedrawingDisabled;
-#ifdef FEAT_WINDOWS
        if (postponed_split)            /* close the window */
        {
            win_close(curwin, FALSE);
            postponed_split = 0;
        }
-#endif
     }
 
 erret:
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
     g_do_tagpreview = 0; /* For next time */
 #endif
     if (tagp.fname_end != NULL)
index 22c7c9a1f953eb115d3545cb53e355d2db3f96b5..f68966e1afec7475cf2d93bfaed453df6911844b 100644 (file)
@@ -196,15 +196,11 @@ static struct builtin_term builtin_termcaps[] =
 # 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_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_WINDOWS
     {(int)KS_CSV,      IF_EB("\033|%d;%dV", ESC_STR "|%d;%dV")},
-#  endif
 # endif
     {(int)KS_CL,       IF_EB("\033|C", ESC_STR "|C")},
                        /* attributes switched on with 'h', off with * 'H' */
@@ -1121,12 +1117,10 @@ static struct builtin_term builtin_termcaps[] =
 #  else
     {(int)KS_CS,       "[%dCS%d]"},
 #  endif
-#  ifdef FEAT_WINDOWS
-#   ifdef TERMINFO
+#  ifdef TERMINFO
     {(int)KS_CSV,      "[%p1%dCSV%p2%d]"},
-#   else
+#  else
     {(int)KS_CSV,      "[%dCSV%d]"},
-#   endif
 #  endif
 #  ifdef TERMINFO
     {(int)KS_CAB,      "[CAB%p1%d]"},
@@ -3134,9 +3128,7 @@ win_new_shellsize(void)
     if (old_Columns != Columns)
     {
        old_Columns = Columns;
-#ifdef FEAT_WINDOWS
        shell_new_columns();    /* update window sizes */
-#endif
     }
 }
 
@@ -3823,11 +3815,9 @@ 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_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)));
-#endif
     screen_start();                /* don't know where cursor is now */
 }
 
@@ -3838,10 +3828,8 @@ scroll_region_set(win_T *wp, int off)
 scroll_region_reset(void)
 {
     OUT_STR(tgoto((char *)T_CS, (int)Rows - 1, 0));
-#ifdef FEAT_WINDOWS
     if (*T_CSV != NUL)
        OUT_STR(tgoto((char *)T_CSV, (int)Columns - 1, 0));
-#endif
     screen_start();                /* don't know where cursor is now */
 }
 
@@ -4120,7 +4108,7 @@ static linenr_T orig_topline = 0;
 static int orig_topfill = 0;
 # endif
 #endif
-#if (defined(FEAT_WINDOWS) && defined(CHECK_DOUBLE_CLICK)) || defined(PROTO)
+#if defined(CHECK_DOUBLE_CLICK) || defined(PROTO)
 /*
  * Checking for double clicks ourselves.
  * "orig_topline" is used to avoid detecting a double-click when the window
@@ -5507,12 +5495,9 @@ check_termcode(
                                    && orig_topfill == curwin->w_topfill
 #endif
                                )
-#ifdef FEAT_WINDOWS
                                /* Double click in tab pages line also works
                                 * when window contents changes. */
-                               || (mouse_row == 0 && firstwin->w_winrow > 0)
-#endif
-                              )
+                               || (mouse_row == 0 && firstwin->w_winrow > 0))
                            )
                        ++orig_num_clicks;
                    else
index b95b4f6de893ad8260084c0959bcf4ef6b8229f1..cc02aaaf3274ff2765898a3321f5074b3b167d70 100644 (file)
@@ -92,9 +92,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_WINDOWS
     KS_CSV,    /* scroll region vertical */
-#endif
     KS_OP,     /* original color pair */
     KS_U7,     /* request cursor position */
     KS_8F,     /* set foreground color (RGB) */
index d33723b120509ed55c293930ce99cc671fd1816c..b64b4e4074bb1c6f99de42dd83e7ed2e1c7ed599 100644 (file)
@@ -2248,7 +2248,7 @@ func! Test_normal49_counts()
 endfunc
 
 func! Test_normal50_commandline()
-  if !has("timers") || !has("cmdline_hist") || !has("vertsplit")
+  if !has("timers") || !has("cmdline_hist")
     return
   endif
   func! DoTimerWork(id)
index d8deb6a8de1277d59fec5ab425b77f790e9a0bb1..49782ae627c72f01ddd26a17dc1a72635e507971 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -2610,9 +2610,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_WINDOWS
     static int on_sep_line = 0;        /* on separator right of window */
-#endif
     static int prev_row = -1;
     static int prev_col = -1;
     static win_T *dragwin = NULL;      /* window being dragged */
@@ -2650,10 +2648,8 @@ retnomove:
         * line, stop Visual mode */
        if (on_status_line)
            return IN_STATUS_LINE;
-#ifdef FEAT_WINDOWS
        if (on_sep_line)
            return IN_SEP_LINE;
-#endif
        if (flags & MOUSE_MAY_STOP_VIS)
        {
            end_visual_mode();
@@ -2691,14 +2687,10 @@ retnomove:
        if (row < 0 || col < 0)                 /* check if it makes sense */
            return IN_UNKNOWN;
 
-#ifdef FEAT_WINDOWS
        /* find the window where the row is in */
        wp = mouse_find_win(&row, &col);
        if (wp == NULL)
            return IN_UNKNOWN;
-#else
-       wp = firstwin;
-#endif
        dragwin = NULL;
        /*
         * winpos and height may change in win_enter()!
@@ -2710,7 +2702,6 @@ retnomove:
        }
        else
            on_status_line = 0;
-#ifdef FEAT_WINDOWS
        if (col >= wp->w_width)         /* In separator line */
        {
            on_sep_line = col - wp->w_width + 1;
@@ -2728,16 +2719,12 @@ retnomove:
            else
                on_status_line = 0;
        }
-#endif
 
        /* Before jumping to another buffer, or moving the cursor for a left
         * click, stop Visual mode. */
        if (VIsual_active
                && (wp->w_buffer != curwin->w_buffer
-                   || (!on_status_line
-#ifdef FEAT_WINDOWS
-                       && !on_sep_line
-#endif
+                   || (!on_status_line && !on_sep_line
 #ifdef FEAT_FOLDING
                        && (
 # ifdef FEAT_RIGHTLEFT
@@ -2771,17 +2758,15 @@ retnomove:
 # endif
        }
 #endif
-#ifdef FEAT_WINDOWS
        /* Only change window focus when not clicking on or dragging the
         * status line.  Do change focus when releasing the mouse button
         * (MOUSE_FOCUS was set above if we dragged first). */
        if (dragwin == NULL || (flags & MOUSE_RELEASED))
            win_enter(wp, TRUE);                /* can make wp invalid! */
-# ifdef CHECK_DOUBLE_CLICK
+#ifdef CHECK_DOUBLE_CLICK
        /* set topline, to be able to check for double click ourselves */
        if (curwin != old_curwin)
            set_mouse_topline(curwin);
-# endif
 #endif
        if (on_status_line)                     /* In (or below) status line */
        {
@@ -2791,7 +2776,6 @@ retnomove:
            else
                return IN_STATUS_LINE | CURSOR_MOVED;
        }
-#ifdef FEAT_WINDOWS
        if (on_sep_line)                        /* In (or below) status line */
        {
            /* Don't use start_arrow() if we're in the same window */
@@ -2800,7 +2784,6 @@ retnomove:
            else
                return IN_SEP_LINE | CURSOR_MOVED;
        }
-#endif
 
        curwin->w_cursor.lnum = curwin->w_topline;
 #ifdef FEAT_GUI
@@ -2813,7 +2796,6 @@ retnomove:
     }
     else if (on_status_line && which_button == MOUSE_LEFT)
     {
-#ifdef FEAT_WINDOWS
        if (dragwin != NULL)
        {
            /* Drag the status line */
@@ -2822,10 +2804,8 @@ retnomove:
            win_drag_status_line(dragwin, count);
            did_drag |= count;
        }
-#endif
        return IN_STATUS_LINE;                  /* Cursor didn't move */
     }
-#ifdef FEAT_WINDOWS
     else if (on_sep_line && which_button == MOUSE_LEFT)
     {
        if (dragwin != NULL)
@@ -2838,7 +2818,6 @@ retnomove:
        }
        return IN_SEP_LINE;                     /* Cursor didn't move */
     }
-#endif
     else /* keep_window_focus must be TRUE */
     {
        /* before moving the cursor for a left click, stop Visual mode */
@@ -2855,9 +2834,7 @@ retnomove:
 #endif
 
        row -= W_WINROW(curwin);
-#ifdef FEAT_WINDOWS
        col -= W_WINCOL(curwin);
-#endif
 
        /*
         * When clicking beyond the end of the window, scroll the screen.
@@ -3100,7 +3077,6 @@ mouse_comp_pos(
     return retval;
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Find the window at screen position "*rowp" and "*colp".  The positions are
  * updated to become relative to the top-left of the window.
@@ -3144,7 +3120,6 @@ mouse_find_win(int *rowp, int *colp UNUSED)
            return wp;
     return NULL;
 }
-#endif
 
 #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \
        || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \
@@ -3162,23 +3137,17 @@ get_fpos_of_mouse(pos_T *mpos)
     if (row < 0 || col < 0)            /* check if it makes sense */
        return IN_UNKNOWN;
 
-#ifdef FEAT_WINDOWS
     /* find the window where the row is in */
     wp = mouse_find_win(&row, &col);
     if (wp == NULL)
        return IN_UNKNOWN;
-#else
-    wp = firstwin;
-#endif
     /*
      * winpos and height may change in win_enter()!
      */
     if (row >= wp->w_height)   /* In (or below) status line */
        return IN_STATUS_LINE;
-#ifdef FEAT_WINDOWS
     if (col >= wp->w_width)    /* In vertical separator line */
        return IN_SEP_LINE;
-#endif
 
     if (wp != curwin)
        return IN_UNKNOWN;
index 20a81f9dd18713c71e8d0a9218bdb8a92f514bde..21ecc934455483f3144fac3095ed367843677c0d 100644 (file)
@@ -667,11 +667,7 @@ static char *(features[]) =
 #else
        "-user_commands",
 #endif
-#ifdef FEAT_WINDOWS
        "+vertsplit",
-#else
-       "-vertsplit",
-#endif
 #ifdef FEAT_VIRTUALEDIT
        "+virtualedit",
 #else
@@ -703,11 +699,7 @@ static char *(features[]) =
 #else
        "-wildmenu",
 #endif
-#ifdef FEAT_WINDOWS
        "+windows",
-#else
-       "-windows",
-#endif
 #ifdef FEAT_WRITEBACKUP
        "+writebackup",
 #else
@@ -769,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1118,
 /**/
     1117,
 /**/
@@ -3436,9 +3430,7 @@ maybe_intro_message(void)
 {
     if (BUFEMPTY()
            && curbuf->b_fname == NULL
-#ifdef FEAT_WINDOWS
            && firstwin->w_next == NULL
-#endif
            && vim_strchr(p_shm, SHM_INTRO) == NULL)
        intro_message(FALSE);
 }
@@ -3511,11 +3503,9 @@ intro_message(
     if (!p_cp)
        blanklines += 4;  /* add 4 for not showing "Vi compatible" message */
 
-#ifdef FEAT_WINDOWS
     /* Don't overwrite a statusline.  Depends on 'cmdheight'. */
     if (p_ls > 1)
        blanklines -= Rows - topframe->fr_height;
-#endif
     if (blanklines < 0)
        blanklines = 0;
 
index cbab10190197ad3d5e8e4dc64ff5033d89ae863c..f497cbccde273429c6a8aba3a6929564bbda42df 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -859,24 +859,12 @@ extern int (*dyn_libintl_putenv)(const char *envstring);
 #define FINDFILE_DIR   1       /* only directories */
 #define FINDFILE_BOTH  2       /* files and directories */
 
-#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)
-# define W_VSEP_WIDTH(wp) (wp->w_vsep_width)
-#else
-# define W_WINCOL(wp)  0
-# define W_WIDTH(wp)   Columns
-# define W_ENDCOL(wp)  Columns
-# define W_VSEP_WIDTH(wp) 0
-#endif
-#ifdef FEAT_WINDOWS
-# define W_STATUS_HEIGHT(wp) (wp->w_status_height)
-# define W_WINROW(wp)  (wp->w_winrow)
-#else
-# define W_STATUS_HEIGHT(wp) 0
-# define W_WINROW(wp)  0
-#endif
+#define W_WINCOL(wp)   (wp->w_wincol)
+#define W_WIDTH(wp)    (wp->w_width)
+#define W_ENDCOL(wp)   (wp->w_wincol + wp->w_width)
+#define W_VSEP_WIDTH(wp) (wp->w_vsep_width)
+#define W_STATUS_HEIGHT(wp) (wp->w_status_height)
+#define W_WINROW(wp)   (wp->w_winrow)
 
 #ifdef NO_EXPANDPATH
 # define gen_expand_wildcards mch_expand_wildcards
index 311009837cf8b43d39c532d5b98c3e7ce7506c79..9b470f6c3bb5344676fd5b0c8b78fe9609e835f6 100644 (file)
@@ -10,7 +10,6 @@
 #include "vim.h"
 
 static int path_is_url(char_u *p);
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 static void cmd_with_count(char *cmd, char_u *bufp, size_t bufsize, long Prenum);
 static void win_init(win_T *newp, win_T *oldp, int flags);
 static void win_init_some(win_T *newp, win_T *oldp);
@@ -36,10 +35,8 @@ static void frame_new_width(frame_T *topfrp, int width, int leftfirst, int wfw);
 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
 static int win_alloc_firstwin(win_T *oldwin);
 static void new_frame(win_T *wp);
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 static tabpage_T *alloc_tabpage(void);
 static int leave_tabpage(buf_T *new_curbuf, int trigger_leave_autocmds);
 static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_autocmds, int trigger_leave_autocmds);
@@ -64,8 +61,6 @@ static win_T *restore_snapshot_rec(frame_T *sn, frame_T *fr);
 static int frame_check_height(frame_T *topfrp, int height);
 static int frame_check_width(frame_T *topfrp, int width);
 
-#endif /* FEAT_WINDOWS */
-
 static win_T *win_alloc(win_T *after, int hidden);
 
 #define URL_SLASH      1               /* path_is_url() has found "://" */
@@ -73,13 +68,7 @@ static win_T *win_alloc(win_T *after, int hidden);
 
 #define NOWIN          (win_T *)-1     /* non-existing window */
 
-#ifdef FEAT_WINDOWS
-# define ROWS_AVAIL (Rows - p_ch - tabline_height())
-#else
-# define ROWS_AVAIL (Rows - p_ch)
-#endif
-
-#if defined(FEAT_WINDOWS) || defined(PROTO)
+#define ROWS_AVAIL (Rows - p_ch - tabline_height())
 
 static char *m_onlyone = N_("Already only one window");
 
@@ -198,7 +187,7 @@ newwindow:
                do_cmdline_cmd(cbuf);
                break;
 
-#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+#if defined(FEAT_QUICKFIX)
 /* close preview window */
     case Ctrl_Z:
     case 'z':
@@ -1354,9 +1343,7 @@ win_init_some(win_T *newp, win_T *oldp)
     win_copy_options(oldp, newp);
 }
 
-#endif /* FEAT_WINDOWS */
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Check if "win" is a pointer to an existing window in the current tab page.
  */
@@ -2596,10 +2583,8 @@ win_free_all(void)
 {
     int                dummy;
 
-# ifdef FEAT_WINDOWS
     while (first_tabpage->tp_next != NULL)
        tabpage_close(TRUE);
-# endif
 
 # ifdef FEAT_AUTOCMD
     if (aucmd_win != NULL)
@@ -3388,8 +3373,6 @@ close_others(
        EMSG(_("E445: Other window contains changes"));
 }
 
-#endif /* FEAT_WINDOWS */
-
 /*
  * Init the current window "curwin".
  * Called when a new file is being edited.
@@ -3441,13 +3424,11 @@ win_alloc_first(void)
     if (win_alloc_firstwin(NULL) == FAIL)
        return FAIL;
 
-#ifdef FEAT_WINDOWS
     first_tabpage = alloc_tabpage();
     if (first_tabpage == NULL)
        return FAIL;
     first_tabpage->tp_topframe = topframe;
     curtab = first_tabpage;
-#endif
 
     return OK;
 }
@@ -3473,8 +3454,7 @@ win_alloc_aucmd_win(void)
 /*
  * Allocate the first window or the first window in a new tab page.
  * When "oldwin" is NULL create an empty buffer for it.
- * When "oldwin" is not NULL copy info from it to the new window (only with
- * FEAT_WINDOWS).
+ * When "oldwin" is not NULL copy info from it to the new window.
  * Return FAIL when something goes wrong (out of memory).
  */
     static int
@@ -3493,12 +3473,9 @@ win_alloc_firstwin(win_T *oldwin)
        curwin->w_s = &(curbuf->b_s);
 #endif
        curbuf->b_nwindows = 1; /* there is one window */
-#ifdef FEAT_WINDOWS
        curwin->w_alist = &global_alist;
-#endif
        curwin_init();          /* init current window */
     }
-#ifdef FEAT_WINDOWS
     else
     {
        /* First window in new tab page, initialize it from "oldwin". */
@@ -3507,15 +3484,12 @@ win_alloc_firstwin(win_T *oldwin)
        /* We don't want cursor- and scroll-binding in the first window. */
        RESET_BINDING(curwin);
     }
-#endif
 
     new_frame(curwin);
     if (curwin->w_frame == NULL)
        return FAIL;
     topframe = curwin->w_frame;
-#ifdef FEAT_WINDOWS
     topframe->fr_width = Columns;
-#endif
     topframe->fr_height = Rows - p_ch;
     topframe->fr_win = curwin;
 
@@ -3546,14 +3520,10 @@ win_init_size(void)
 {
     firstwin->w_height = ROWS_AVAIL;
     topframe->fr_height = ROWS_AVAIL;
-#ifdef FEAT_WINDOWS
     firstwin->w_width = Columns;
     topframe->fr_width = Columns;
-#endif
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
-
 /*
  * Allocate a new tabpage_T and init the values.
  * Returns NULL when out of memory.
@@ -4185,19 +4155,14 @@ win_find_nr(int winnr)
 {
     win_T      *wp;
 
-# ifdef FEAT_WINDOWS
     FOR_ALL_WINDOWS(wp)
        if (--winnr == 0)
            break;
     return wp;
-# else
-    return curwin;
-# endif
 }
 #endif
 
-#if (defined(FEAT_WINDOWS) && (defined(FEAT_PYTHON) || defined(FEAT_PYTHON3))) \
-       || defined(PROTO)
+#if ((defined(FEAT_PYTHON) || defined(FEAT_PYTHON3))) || defined(PROTO)
 /*
  * Find the tabpage for window "win".
  */
@@ -4481,9 +4446,7 @@ win_enter_ext(
     DO_AUTOCHDIR
 }
 
-#endif /* FEAT_WINDOWS */
 
-#if defined(FEAT_WINDOWS) || defined(FEAT_SIGNS) || defined(PROTO)
 /*
  * Jump to the first open window that contains buffer "buf", if one exists.
  * Returns a pointer to the window found, otherwise NULL.
@@ -4495,14 +4458,12 @@ buf_jump_open_win(buf_T *buf)
 
     if (curwin->w_buffer == buf)
        wp = curwin;
-# ifdef FEAT_WINDOWS
     else
        FOR_ALL_WINDOWS(wp)
            if (wp->w_buffer == buf)
                break;
     if (wp != NULL)
        win_enter(wp, FALSE);
-# endif
     return wp;
 }
 
@@ -4515,7 +4476,6 @@ buf_jump_open_win(buf_T *buf)
 buf_jump_open_tab(buf_T *buf)
 {
     win_T      *wp = buf_jump_open_win(buf);
-# ifdef FEAT_WINDOWS
     tabpage_T  *tp;
 
     if (wp != NULL)
@@ -4535,10 +4495,8 @@ buf_jump_open_tab(buf_T *buf)
                break;
            }
        }
-# endif
     return wp;
 }
-#endif
 
 static int last_win_id = LOWEST_WIN_ID - 1;
 
@@ -4587,12 +4545,10 @@ win_alloc(win_T *after UNUSED, int hidden UNUSED)
     /*
      * link the window in the window list
      */
-#ifdef FEAT_WINDOWS
     if (!hidden)
        win_append(after, new_wp);
     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;
@@ -4631,8 +4587,6 @@ win_alloc(win_T *after UNUSED, int hidden UNUSED)
     return new_wp;
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
-
 /*
  * Remove window 'wp' from the window list and free the structure.
  */
@@ -4850,8 +4804,6 @@ frame_remove(frame_T *frp)
        frp->fr_next->fr_prev = frp->fr_prev;
 }
 
-#endif /* FEAT_WINDOWS */
-
 /*
  * Allocate w_lines[] for window "wp".
  * Return FAIL for failure, OK for success.
@@ -4891,7 +4843,6 @@ shell_new_rows(void)
 
     if (firstwin == NULL)      /* not initialized yet */
        return;
-#ifdef FEAT_WINDOWS
     if (h < frame_minheight(topframe, NULL))
        h = frame_minheight(topframe, NULL);
 
@@ -4902,15 +4853,8 @@ shell_new_rows(void)
        frame_new_height(topframe, h, FALSE, FALSE);
 
     (void)win_comp_pos();              /* recompute w_winrow and w_wincol */
-#else
-    if (h < 1)
-       h = 1;
-    win_new_height(firstwin, h);
-#endif
     compute_cmdrow();
-#ifdef FEAT_WINDOWS
     curtab->tp_ch_used = p_ch;
-#endif
 
 #if 0
     /* Disabled: don't want making the screen smaller make a window larger. */
@@ -4919,7 +4863,6 @@ shell_new_rows(void)
 #endif
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Called from win_new_shellsize() after Columns changed.
  */
@@ -4942,7 +4885,6 @@ shell_new_columns(void)
        win_equal(curwin, FALSE, 'h');
 #endif
 }
-#endif
 
 #if defined(FEAT_CMDWIN) || defined(PROTO)
 /*
@@ -4993,7 +4935,6 @@ win_size_restore(garray_T *gap)
 }
 #endif /* FEAT_CMDWIN */
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Update the position for all windows, using the width and height of the
  * frames.
@@ -5052,8 +4993,6 @@ frame_comp_pos(frame_T *topfrp, int *row, int *col)
     }
 }
 
-#endif /* FEAT_WINDOWS */
-
 /*
  * Set current window height and take care of repositioning other windows to
  * fit around it.
@@ -5077,25 +5016,16 @@ win_setheight_win(int height, win_T *win)
     {
        /* Always keep current window at least one line high, even when
         * 'winminheight' is zero. */
-#ifdef FEAT_WINDOWS
        if (height < p_wmh)
            height = p_wmh;
-#endif
        if (height == 0)
            height = 1;
     }
 
-#ifdef FEAT_WINDOWS
     frame_setheight(win->w_frame, height + win->w_status_height);
 
     /* recompute the window positions */
     row = win_comp_pos();
-#else
-    if (height > topframe->fr_height)
-       height = topframe->fr_height;
-    win->w_height = height;
-    row = height;
-#endif
 
     /*
      * If there is extra space created between the last window and the command
@@ -5110,8 +5040,6 @@ win_setheight_win(int height, win_T *win)
     redraw_all_later(NOT_VALID);
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
-
 /*
  * Set the height of a frame to "height" and take care that all frames and
  * windows inside it are resized.  Also resize frames on the left and right if
@@ -5725,8 +5653,6 @@ win_drag_vsep_line(win_T *dragwin, int offset)
 }
 #endif /* FEAT_MOUSE */
 
-#endif /* FEAT_WINDOWS */
-
 #define FRACTION_MULT  16384L
 
 /*
@@ -5898,13 +5824,10 @@ scroll_to_fraction(win_T *wp, int prev_height)
 
     win_comp_scroll(wp);
     redraw_win_later(wp, SOME_VALID);
-#ifdef FEAT_WINDOWS
     wp->w_redr_status = TRUE;
-#endif
     invalidate_botline_win(wp);
 }
 
-#ifdef FEAT_WINDOWS
 /*
  * Set the width of a window.
  */
@@ -5923,7 +5846,6 @@ win_new_width(win_T *wp, int width)
     redraw_win_later(wp, NOT_VALID);
     wp->w_redr_status = TRUE;
 }
-#endif
 
     void
 win_comp_scroll(win_T *wp)
@@ -5939,7 +5861,6 @@ win_comp_scroll(win_T *wp)
     void
 command_height(void)
 {
-#ifdef FEAT_WINDOWS
     int                h;
     frame_T    *frp;
     int                old_p_ch = curtab->tp_ch_used;
@@ -6004,13 +5925,8 @@ command_height(void)
     /* Recompute window positions. */
     if (frp != lastwin->w_frame)
        (void)win_comp_pos();
-#else
-    cmdline_row = Rows - p_ch;
-    win_setheight(cmdline_row);
-#endif
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Resize frame "frp" to be "n" lines higher (negative for less high).
  * Also resize the frames it is contained in.
@@ -6122,8 +6038,6 @@ tabline_height(void)
     return 1;
 }
 
-#endif /* FEAT_WINDOWS */
-
 #if defined(FEAT_SEARCHPATH) || defined(PROTO)
 /*
  * Get the file name at the cursor.
@@ -6438,15 +6352,12 @@ vim_FullName(
 min_rows(void)
 {
     int                total;
-#ifdef FEAT_WINDOWS
     tabpage_T  *tp;
     int                n;
-#endif
 
     if (firstwin == NULL)      /* not initialized yet */
        return MIN_LINES;
 
-#ifdef FEAT_WINDOWS
     total = 0;
     FOR_ALL_TABPAGES(tp)
     {
@@ -6455,9 +6366,6 @@ min_rows(void)
            total = n;
     }
     total += tabline_height();
-#else
-    total = 1;         /* at least one window should have a line! */
-#endif
     total += 1;                /* count the room for the command line */
     return total;
 }
@@ -6470,7 +6378,6 @@ min_rows(void)
     int
 only_one_window(void)
 {
-#ifdef FEAT_WINDOWS
     int                count = 0;
     win_T      *wp;
 
@@ -6491,12 +6398,8 @@ only_one_window(void)
           )
            ++count;
     return (count <= 1);
-#else
-    return TRUE;
-#endif
 }
 
-#if defined(FEAT_WINDOWS) || defined(FEAT_AUTOCMD) || defined(PROTO)
 /*
  * Correct the cursor line number in other windows.  Used after changing the
  * current buffer, and before applying autocommands.
@@ -6506,16 +6409,10 @@ only_one_window(void)
 check_lnums(int do_curwin)
 {
     win_T      *wp;
-
-#ifdef FEAT_WINDOWS
     tabpage_T  *tp;
 
     FOR_ALL_TAB_WINDOWS(tp, wp)
        if ((do_curwin || wp != curwin) && wp->w_buffer == curbuf)
-#else
-    wp = curwin;
-    if (do_curwin)
-#endif
        {
            if (wp->w_cursor.lnum > curbuf->b_ml.ml_line_count)
                wp->w_cursor.lnum = curbuf->b_ml.ml_line_count;
@@ -6523,9 +6420,6 @@ check_lnums(int do_curwin)
                wp->w_topline = curbuf->b_ml.ml_line_count;
        }
 }
-#endif
-
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 
 /*
  * A snapshot of the window sizes, to restore them after closing the help
@@ -6666,8 +6560,6 @@ restore_snapshot_rec(frame_T *sn, frame_T *fr)
     return wp;
 }
 
-#endif
-
 #if defined(FEAT_EVAL) || defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) \
        || defined(PROTO)
 /*
@@ -6689,7 +6581,6 @@ switch_win(
 # ifdef FEAT_AUTOCMD
     block_autocmds();
 # endif
-# ifdef FEAT_WINDOWS
     *save_curwin = curwin;
     if (tp != NULL)
     {
@@ -6709,7 +6600,6 @@ switch_win(
        return FAIL;
     curwin = win;
     curbuf = curwin->w_buffer;
-# endif
     return OK;
 }
 
@@ -6724,7 +6614,6 @@ restore_win(
     tabpage_T  *save_curtab UNUSED,
     int                no_display UNUSED)
 {
-# ifdef FEAT_WINDOWS
     if (save_curtab != NULL && valid_tabpage(save_curtab))
     {
        if (no_display)
@@ -6743,7 +6632,6 @@ restore_win(
        curwin = save_curwin;
        curbuf = curwin->w_buffer;
     }
-# endif
 # ifdef FEAT_AUTOCMD
     unblock_autocmds();
 # endif
@@ -6786,7 +6674,7 @@ restore_buffer(bufref_T *save_curbuf)
 }
 #endif
 
-#if (defined(FEAT_GUI) && defined(FEAT_WINDOWS)) || defined(PROTO)
+#if defined(FEAT_GUI) || defined(PROTO)
 /*
  * Return TRUE if there is any vertically split window.
  */
@@ -7121,7 +7009,6 @@ get_win_number(win_T *wp, win_T *first_win)
 get_tab_number(tabpage_T *tp UNUSED)
 {
     int                i = 1;
-# ifdef FEAT_WINDOWS
     tabpage_T  *t;
 
     for (t = first_tabpage; t != NULL && t != tp; t = t->tp_next)
@@ -7130,12 +7017,10 @@ get_tab_number(tabpage_T *tp UNUSED)
     if (t == NULL)
        return 0;
     else
-# endif
        return i;
 }
 #endif
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Return TRUE if "topfrp" and its children are at the right height.
  */
@@ -7154,9 +7039,7 @@ frame_check_height(frame_T *topfrp, int height)
 
     return TRUE;
 }
-#endif
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * Return TRUE if "topfrp" and its children are at the right width.
  */
@@ -7175,7 +7058,6 @@ frame_check_width(frame_T *topfrp, int width)
 
     return TRUE;
 }
-#endif
 
 #if defined(FEAT_EVAL) || defined(PROTO)
     int
index 844da854a2ba5ecb0bb3d801fd91a4580020cd5c..41ee3d4cbfbf17e49211cc4d7f6ca09ed52aaafa 100644 (file)
@@ -1265,7 +1265,6 @@ load_window(
     }
     else
     {
-#ifdef FEAT_WINDOWS
        /* buf is in a window */
        if (win != curwin)
        {
@@ -1273,7 +1272,6 @@ load_window(
            /* wsdebug("load_window: window enter %s\n",
                    win->w_buffer->b_sfname); */
        }
-#endif
        if (lnum > 0 && win->w_cursor.lnum != lnum)
        {
            warp_to_pc(lnum);