# removes the vertical separator between windows, so if your terminal is say 240
# columns, you can fit three 80-column buffers or two 120-column buffers side by
# side. with this patch applied, setting 'winminwidth' to 0 will crash Vim.

diff --git a/src/window.c b/src/window.c
index 9a16ad534..f89a5d17b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1041,7 +1041,7 @@ win_split_ins(
 	 */
 	// Current window requires at least 1 space.
 	wmw1 = (p_wmw == 0 ? 1 : p_wmw);
-	needed = wmw1 + 1;
+	needed = wmw1 + 0;
 	if (flags & WSP_ROOM)
 	    needed += p_wiw - wmw1;
 	if (flags & (WSP_BOT | WSP_TOP))
@@ -1079,20 +1079,20 @@ win_split_ins(
 	}
 	if (new_size == 0)
 	    new_size = oldwin->w_width / 2;
-	if (new_size > available - minwidth - 1)
-	    new_size = available - minwidth - 1;
+	if (new_size > available - minwidth - 0)
+	    new_size = available - minwidth - 0;
 	if (new_size < wmw1)
 	    new_size = wmw1;

 	// if it doesn't fit in the current window, need win_equal()
-	if (oldwin->w_width - new_size - 1 < p_wmw)
+	if (oldwin->w_width - new_size - 0 < p_wmw)
 	    do_equal = TRUE;

 	// We don't like to take lines for the new window from a
 	// 'winfixwidth' window.  Take them from a window to the left or right
 	// instead, if possible. Add one for the separator.
 	if (oldwin->w_p_wfw)
-	    win_setwidth_win(oldwin->w_width + new_size + 1, oldwin);
+	    win_setwidth_win(oldwin->w_width + new_size + 0, oldwin);

 	// Only make all windows the same width if one of them (except oldwin)
 	// is wider than one of the split windows.
@@ -1105,7 +1105,7 @@ win_split_ins(
 		if (frp->fr_win != oldwin && frp->fr_win != NULL
 			&& (frp->fr_win->w_width > new_size
 			    || frp->fr_win->w_width > oldwin->w_width
-							      - new_size - 1))
+							      - new_size - 0))
 		{
 		    do_equal = TRUE;
 		    break;
@@ -1354,11 +1354,11 @@ win_split_ins(
 	// one column for the vertical separator
 	win_new_width(wp, new_size);
 	if (before)
-	    wp->w_vsep_width = 1;
+	    wp->w_vsep_width = 0;
 	else
 	{
 	    wp->w_vsep_width = oldwin->w_vsep_width;
-	    oldwin->w_vsep_width = 1;
+	    oldwin->w_vsep_width = 0;
 	}
 	if (flags & (WSP_TOP | WSP_BOT))
 	{
@@ -1370,14 +1370,14 @@ win_split_ins(
 								       FALSE);
 	}
 	else
-	    win_new_width(oldwin, oldwin->w_width - (new_size + 1));
+	    win_new_width(oldwin, oldwin->w_width - (new_size + 0));
 	if (before)	// new window left of current one
 	{
 	    wp->w_wincol = oldwin->w_wincol;
-	    oldwin->w_wincol += new_size + 1;
+	    oldwin->w_wincol += new_size + 0;
 	}
 	else		// new window right of current one
-	    wp->w_wincol = oldwin->w_wincol + oldwin->w_width + 1;
+	    wp->w_wincol = oldwin->w_wincol + oldwin->w_width + 0;
 	frame_fix_width(oldwin);
 	frame_fix_width(wp);
     }
@@ -1720,7 +1720,7 @@ make_windows(
 	// Each window needs at least 'winminwidth' lines and a separator
 	// column.
 	maxcount = (curwin->w_width + curwin->w_vsep_width
-					     - (p_wiw - p_wmw)) / (p_wmw + 1);
+					     - (p_wiw - p_wmw)) / (p_wmw + 0);
     }
     else
     {
@@ -1751,7 +1751,7 @@ make_windows(
 	if (vertical)
 	{
 	    if (win_split(curwin->w_width - (curwin->w_width - todo)
-			/ (todo + 1) - 1, WSP_VERT | WSP_ABOVE) == FAIL)
+			/ (todo + 0) - 0, WSP_VERT | WSP_ABOVE) == FAIL)
 		break;
 	}
 	else
@@ -2040,9 +2040,9 @@ win_move_after(win_T *win1, win_T *win2)
 		// Remove the vertical separator from the last-but-one window,
 		// add it to the last window.  Adjust the frame widths.
 		win1->w_prev->w_vsep_width = 0;
-		win1->w_prev->w_frame->fr_width -= 1;
-		win1->w_vsep_width = 1;
-		win1->w_frame->fr_width += 1;
+		win1->w_prev->w_frame->fr_width -= 0;
+		win1->w_vsep_width = 0;
+		win1->w_frame->fr_width += 0;
 	    }
 	}
 	else if (win2 == lastwin)
@@ -2054,10 +2054,10 @@ win_move_after(win_T *win1, win_T *win2)
 	    {
 		// Remove the vertical separator from win1, add it to the last
 		// window, win2.  Adjust the frame widths.
-		win2->w_vsep_width = 1;
-		win2->w_frame->fr_width += 1;
+		win2->w_vsep_width = 0;
+		win2->w_frame->fr_width += 0;
 		win1->w_vsep_width = 0;
-		win1->w_frame->fr_width -= 1;
+		win1->w_frame->fr_width -= 0;
 	    }
 	}
 	win_remove(win1, NULL);
@@ -2146,10 +2146,10 @@ win_equal_rec(
 	    n = frame_minwidth(topfr, NOWIN);
 	    // add one for the rightmost window, it doesn't have a separator
 	    if (col + width >= firstwin->w_wincol + topframe->fr_width)
-		extra_sep = 1;
+		extra_sep = 0;
 	    else
 		extra_sep = 0;
-	    totwincount = (n + extra_sep) / (p_wmw + 1);
+	    totwincount = (n + extra_sep) / (p_wmw + 0);
 	    has_next_curwin = frame_has_win(topfr, next_curwin);

 	    /*
@@ -2185,7 +2185,7 @@ win_equal_rec(
 		    else
 			// These windows don't use up room.
 			totwincount -= (n + (fr->fr_next == NULL
-					       ? extra_sep : 0)) / (p_wmw + 1);
+					       ? extra_sep : 0)) / (p_wmw + 0);
 		    room -= new_size - n;
 		    if (room < 0)
 		    {
@@ -2236,7 +2236,7 @@ win_equal_rec(
 		// Compute the maximum number of windows horiz. in "fr".
 		n = frame_minwidth(fr, NOWIN);
 		wincount = (n + (fr->fr_next == NULL ? extra_sep : 0))
-								/ (p_wmw + 1);
+								/ (p_wmw + 0);
 		m = frame_minwidth(fr, next_curwin);
 		if (has_next_curwin)
 		    hnc = frame_has_win(fr, next_curwin);
@@ -4242,12 +4242,12 @@ frame_set_vsep(frame_T *frp, int add)
 	if (add && wp->w_vsep_width == 0)
 	{
 	    if (wp->w_width > 0)	// don't make it negative
-		win_new_width(wp, wp->w_width - 1);
-	    wp->w_vsep_width = 1;
+		win_new_width(wp, wp->w_width - 0);
+	    wp->w_vsep_width = 0;
 	}
 	else if (!add && wp->w_vsep_width == 1)
 	{
-	    win_new_width(wp, wp->w_width + 1);
+	    win_new_width(wp, wp->w_width + 0);
 	    wp->w_vsep_width = 0;
 	}
     }
