From dd7657c1605246e8f7ade35184069a09dc254e84 Mon Sep 17 00:00:00 2001 From: Hinidu Date: Tue, 8 Apr 2014 23:52:28 +0300 Subject: [PATCH] Removed FEAT_WINDOWS Support for multiple windows and status line. --- config/config.h.in | 1 - src/nvim/buffer.c | 15 +++++++-------- src/nvim/charset.c | 8 +++----- src/nvim/globals.h | 1 - src/nvim/misc2.c | 4 +--- src/nvim/path.c | 3 --- src/nvim/screen.c | 2 +- src/nvim/term.c | 2 +- src/nvim/window.c | 3 +-- 9 files changed, 14 insertions(+), 25 deletions(-) diff --git a/config/config.h.in b/config/config.h.in index 88352b1d71..50002bebeb 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -176,7 +176,6 @@ #define FEAT_WAK #define FEAT_WILDIGN #define FEAT_WILDMENU -#define FEAT_WINDOWS #define FEAT_WRITEBACK #define FEAT_HUGE #define FEAT_BIG diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 946053140d..5942f51df4 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -601,14 +601,12 @@ static void clear_wininfo(buf_T *buf) */ void goto_buffer(exarg_T *eap, int start, int dir, int count) { -# if defined(FEAT_WINDOWS) && defined(HAS_SWAP_EXISTS_ACTION) - buf_T *old_curbuf = curbuf; - - swap_exists_action = SEA_DIALOG; -# 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) +#ifdef HAS_SWAP_EXISTS_ACTION + buf_T *old_curbuf = curbuf; + swap_exists_action = SEA_DIALOG; + if (swap_exists_action == SEA_QUIT && *eap->cmd == 's') { cleanup_T cs; @@ -624,9 +622,10 @@ void goto_buffer(exarg_T *eap, int start, int dir, int count) /* Restore the error/interrupt/exception state if not discarded by a * new aborting error, interrupt, or uncaught exception. */ leave_cleanup(&cs); - } else + } else { handle_swap_exists(old_curbuf); -# endif + } +#endif } #if defined(HAS_SWAP_EXISTS_ACTION) || defined(PROTO) diff --git a/src/nvim/charset.c b/src/nvim/charset.c index ae5da557d5..28463d9705 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -1838,9 +1838,7 @@ int 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. @@ -1857,8 +1855,8 @@ int hexhex2nr(char_u *p) return (hex2nr(p[0]) << 4) + hex2nr(p[1]); } -#endif // if defined(FEAT_TERMRESPONSE) || (defined(FEAT_GUI_GTK) - // && defined(FEAT_WINDOWS)) || defined(PROTO) +#endif // if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) + // || defined(PROTO) /// Return TRUE if "str" starts with a backslash that should be removed. /// For WIN32 this is only done when the character after the diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 869972e3b4..331d7ec5a4 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -395,7 +395,6 @@ EXTERN int updating_screen INIT(= FALSE); * 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. */ EXTERN win_T *firstwin; /* first window */ EXTERN win_T *lastwin; /* last window */ diff --git a/src/nvim/misc2.c b/src/nvim/misc2.c index 1db6c4193c..598e17ef7b 100644 --- a/src/nvim/misc2.c +++ b/src/nvim/misc2.c @@ -363,9 +363,7 @@ int get_real_state(void) } #if defined(FEAT_SESSION) || defined(MSWIN) || defined(FEAT_GUI_MAC) \ - || ((defined(FEAT_GUI_GTK)) \ - && ( defined(FEAT_WINDOWS) || defined(FEAT_DND)) ) \ - || defined(PROTO) + || defined(FEAT_GUI_GTK) || defined(PROTO) /* * Change to a file's directory. * Caller must call shorten_fnames()! diff --git a/src/nvim/path.c b/src/nvim/path.c index 5a1c9cd1c3..1222b97fd6 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -165,8 +165,6 @@ int 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. @@ -199,7 +197,6 @@ void shorten_dir(char_u *str) } } } -#endif /* * Return TRUE if the directory of "fname" exists, FALSE otherwise. diff --git a/src/nvim/screen.c b/src/nvim/screen.c index e14f7d20d3..df5fbd84b5 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2301,7 +2301,7 @@ win_line ( int change_end = -1; /* last col of changed area */ colnr_T trailcol = MAXCOL; /* start of trailing spaces */ int need_showbreak = FALSE; -#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 */ diff --git a/src/nvim/term.c b/src/nvim/term.c index 073ed30052..c4a190c818 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -3137,7 +3137,7 @@ static void switch_to_8bit(void) static linenr_T orig_topline = 0; static int orig_topfill = 0; #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 diff --git a/src/nvim/window.c b/src/nvim/window.c index 6f97401a80..11ed1c0730 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -2782,8 +2782,7 @@ void 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 win_alloc_firstwin(win_T *oldwin)