Mercurial > vim
diff src/search.c @ 12477:68d7bc045dbe v8.0.1118
patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs
commit https://github.com/vim/vim/commit/4033c55eca575777718c0701e26635a0cc47d907
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 16 20:54:51 2017 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 16 Sep 2017 21:00:06 +0200 |
parents | 5e36b2f825cb |
children | 972ea22c946f |
line wrap: on
line diff
--- a/src/search.c +++ b/src/search.c @@ -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)) {