0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -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

@@ -1092,10 +1092,7 @@ win_lbr_chartabsize(
&& VIM_ISBREAK(c)
&& !VIM_ISBREAK((int)s[1])
&& wp->w_p_wrap
# ifdef FEAT_WINDOWS
&& wp->w_width != 0
# endif
)
&& wp->w_width != 0)
{
/*
* Count all characters from first non-blank after a blank up to next
@@ -1249,10 +1246,8 @@ in_win_border(win_T *wp, colnr_T vcol)
int width1; /* width of first line (after line number) */
int width2; /* width of further lines */
# ifdef FEAT_WINDOWS
if (wp->w_width == 0) /* there is no border */
return FALSE;
# endif
width1 = W_WIDTH(wp) - win_col_off(wp);
if ((int)vcol < width1 - 1)
return FALSE;
@@ -2029,8 +2024,7 @@ 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.