Blob Blame History Raw
To: vim-dev@vim.org
Subject: patch 7.0.196
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.0.196
Problem:    When using ":vert ball" the computation of the mouse pointer
	    position may be off by one column. (Stefan Karlsson)
Solution:   Recompute the frame width when moving the vertical separator from
	    one window to another.
Files:	    src/window.c


*** ../vim-7.0.195/src/window.c	Tue Nov 21 20:57:21 2006
--- src/window.c	Tue Feb 20 00:16:35 2007
***************
*** 1541,1548 ****
  	    win1->w_prev->w_status_height = win1->w_status_height;
  	    win1->w_status_height = height;
  #ifdef FEAT_VERTSPLIT
! 	    win1->w_prev->w_vsep_width = 0;
! 	    win1->w_vsep_width = 1;
  #endif
  	}
  	else if (win2 == lastwin)
--- 1541,1555 ----
  	    win1->w_prev->w_status_height = win1->w_status_height;
  	    win1->w_status_height = height;
  #ifdef FEAT_VERTSPLIT
! 	    if (win1->w_prev->w_vsep_width == 1)
! 	    {
! 		/* 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;
! 	    }
  #endif
  	}
  	else if (win2 == lastwin)
***************
*** 1551,1558 ****
  	    win1->w_status_height = win2->w_status_height;
  	    win2->w_status_height = height;
  #ifdef FEAT_VERTSPLIT
! 	    win2->w_vsep_width = 1;
! 	    win1->w_vsep_width = 0;
  #endif
  	}
  	win_remove(win1, NULL);
--- 1558,1572 ----
  	    win1->w_status_height = win2->w_status_height;
  	    win2->w_status_height = height;
  #ifdef FEAT_VERTSPLIT
! 	    if (win1->w_vsep_width == 1)
! 	    {
! 		/* 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;
! 		win1->w_vsep_width = 0;
! 		win1->w_frame->fr_width -= 1;
! 	    }
  #endif
  	}
  	win_remove(win1, NULL);
*** ../vim-7.0.195/src/version.c	Tue Feb 13 06:21:24 2007
--- src/version.c	Tue Feb 20 00:14:00 2007
***************
*** 668,669 ****
--- 668,671 ----
  {   /* Add new patch number below this line */
+ /**/
+     196,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
150. You find yourself counting emoticons to get to sleep.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///