diff src/misc1.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 4dba3e4f3b01
children 972ea22c946f
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1984,10 +1984,8 @@ plines_win_nofill(
     if (!wp->w_p_wrap)
 	return 1;
 
-#ifdef FEAT_WINDOWS
     if (wp->w_width == 0)
 	return 1;
-#endif
 
 #ifdef FEAT_FOLDING
     /* A folded lines is handled just like an empty line. */
@@ -2060,10 +2058,8 @@ plines_win_col(win_T *wp, linenr_T lnum,
     if (!wp->w_p_wrap)
 	return lines + 1;
 
-#ifdef FEAT_WINDOWS
     if (wp->w_width == 0)
 	return lines + 1;
-#endif
 
     line = s = ml_get_buf(wp->w_buffer, lnum, FALSE);
 
@@ -2787,10 +2783,8 @@ changed_int(void)
 {
     curbuf->b_changed = TRUE;
     ml_setflags(curbuf);
-#ifdef FEAT_WINDOWS
     check_status(curbuf);
     redraw_tabline = TRUE;
-#endif
 #ifdef FEAT_TITLE
     need_maketitle = TRUE;	    /* set window title later */
 #endif
@@ -2995,9 +2989,7 @@ changed_common(
     long	xtra)
 {
     win_T	*wp;
-#ifdef FEAT_WINDOWS
     tabpage_T	*tp;
-#endif
     int		i;
 #ifdef FEAT_JUMPLIST
     int		cols;
@@ -3199,10 +3191,8 @@ unchanged(
 	ml_setflags(buf);
 	if (ff)
 	    save_file_ff(buf);
-#ifdef FEAT_WINDOWS
 	check_status(buf);
 	redraw_tabline = TRUE;
-#endif
 #ifdef FEAT_TITLE
 	need_maketitle = TRUE;	    /* set window title later */
 #endif
@@ -3213,7 +3203,6 @@ unchanged(
 #endif
 }
 
-#if defined(FEAT_WINDOWS) || defined(PROTO)
 /*
  * check_status: called when the status bars for the buffer 'buf'
  *		 need to be updated
@@ -3231,7 +3220,6 @@ check_status(buf_T *buf)
 		must_redraw = VALID;
 	}
 }
-#endif
 
 /*
  * If the file is readonly, give a warning message with the first change.
@@ -5024,8 +5012,6 @@ vim_ispathlistsep(int c)
 }
 #endif
 
-#if defined(FEAT_GUI_TABLINE) || defined(FEAT_WINDOWS) \
-	|| defined(FEAT_EVAL) || defined(PROTO)
 /*
  * Shorten the path of a file from "~/foo/../.bar/fname" to "~/f/../.b/fname"
  * It's done in-place.
@@ -5068,7 +5054,6 @@ shorten_dir(char_u *str)
 	}
     }
 }
-#endif
 
 /*
  * Return TRUE if the directory of "fname" exists, FALSE otherwise.