0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2017-09-16 20:54:51 +02:00
parent e738a1a033
commit 4033c55eca
57 changed files with 238 additions and 1590 deletions

View 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