Mercurial > vim
diff src/gui_beval.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 | 2c020bc30f62 |
children | 972ea22c946f |
line wrap: on
line diff
--- a/src/gui_beval.c +++ b/src/gui_beval.c @@ -29,9 +29,7 @@ general_beval_cb(BalloonEval *beval, int 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 : 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