patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs
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.
diff --git a/src/search.c b/src/search.c
index 79cd50a..39e353c 100644
--- a/src/search.c
+++ b/src/search.c
@@ -4906,7 +4906,7 @@
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 @@
{
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 @@
#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 @@
#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 @@
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))
{