Karsten Hopp 743caf
To: vim_dev@googlegroups.com
Karsten Hopp 743caf
Subject: Patch 7.4.669
Karsten Hopp 743caf
Fcc: outbox
Karsten Hopp 743caf
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 743caf
Mime-Version: 1.0
Karsten Hopp 743caf
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 743caf
Content-Transfer-Encoding: 8bit
Karsten Hopp 743caf
------------
Karsten Hopp 743caf
Karsten Hopp 743caf
Patch 7.4.669
Karsten Hopp 743caf
Problem:    When netbeans is active the sign column always shows up.
Karsten Hopp 743caf
Solution:   Only show the sign column once a sign has been added. (Xavier de
Karsten Hopp 743caf
	    Gaye)
Karsten Hopp 743caf
Files:	    src/buffer.c, src/edit.c, src/move.c, src/netbeans.c,
Karsten Hopp 743caf
	    src/screen.c, src/structs.h
Karsten Hopp 743caf
Karsten Hopp 743caf
Karsten Hopp 743caf
*** ../vim-7.4.668/src/buffer.c	2015-02-27 19:34:51.460777333 +0100
Karsten Hopp 743caf
--- src/buffer.c	2015-03-20 17:56:18.289643264 +0100
Karsten Hopp 743caf
***************
Karsten Hopp 743caf
*** 5473,5478 ****
Karsten Hopp 743caf
--- 5473,5482 ----
Karsten Hopp 743caf
  
Karsten Hopp 743caf
  	    /* first sign in signlist */
Karsten Hopp 743caf
  	    buf->b_signlist = newsign;
Karsten Hopp 743caf
+ #ifdef FEAT_NETBEANS_INTG
Karsten Hopp 743caf
+ 	    if (netbeans_active())
Karsten Hopp 743caf
+ 		buf->b_has_sign_column = TRUE;
Karsten Hopp 743caf
+ #endif
Karsten Hopp 743caf
  	}
Karsten Hopp 743caf
  	else
Karsten Hopp 743caf
  	    prev->next = newsign;
Karsten Hopp 743caf
*** ../vim-7.4.668/src/edit.c	2015-03-13 13:24:16.319989139 +0100
Karsten Hopp 743caf
--- src/edit.c	2015-03-20 17:58:31.328143526 +0100
Karsten Hopp 743caf
***************
Karsten Hopp 743caf
*** 6687,6693 ****
Karsten Hopp 743caf
  #ifdef FEAT_SIGNS
Karsten Hopp 743caf
  	if (curwin->w_buffer->b_signlist != NULL
Karsten Hopp 743caf
  # ifdef FEAT_NETBEANS_INTG
Karsten Hopp 743caf
! 			    || netbeans_active()
Karsten Hopp 743caf
  # endif
Karsten Hopp 743caf
  		    )
Karsten Hopp 743caf
  	    textwidth -= 1;
Karsten Hopp 743caf
--- 6687,6693 ----
Karsten Hopp 743caf
  #ifdef FEAT_SIGNS
Karsten Hopp 743caf
  	if (curwin->w_buffer->b_signlist != NULL
Karsten Hopp 743caf
  # ifdef FEAT_NETBEANS_INTG
Karsten Hopp 743caf
! 			  || curwin->w_buffer->b_has_sign_column
Karsten Hopp 743caf
  # endif
Karsten Hopp 743caf
  		    )
Karsten Hopp 743caf
  	    textwidth -= 1;
Karsten Hopp 743caf
*** ../vim-7.4.668/src/move.c	2014-12-13 21:09:53.721226911 +0100
Karsten Hopp 743caf
--- src/move.c	2015-03-20 17:56:34.973455188 +0100
Karsten Hopp 743caf
***************
Karsten Hopp 743caf
*** 905,911 ****
Karsten Hopp 743caf
  	    + (
Karsten Hopp 743caf
  # ifdef FEAT_NETBEANS_INTG
Karsten Hopp 743caf
  		/* show glyph gutter in netbeans */
Karsten Hopp 743caf
! 		netbeans_active() ||
Karsten Hopp 743caf
  # endif
Karsten Hopp 743caf
  		wp->w_buffer->b_signlist != NULL ? 2 : 0)
Karsten Hopp 743caf
  #endif
Karsten Hopp 743caf
--- 905,911 ----
Karsten Hopp 743caf
  	    + (
Karsten Hopp 743caf
  # ifdef FEAT_NETBEANS_INTG
Karsten Hopp 743caf
  		/* show glyph gutter in netbeans */
Karsten Hopp 743caf
! 		wp->w_buffer->b_has_sign_column ||
Karsten Hopp 743caf
  # endif
Karsten Hopp 743caf
  		wp->w_buffer->b_signlist != NULL ? 2 : 0)
Karsten Hopp 743caf
  #endif
Karsten Hopp 743caf
*** ../vim-7.4.668/src/netbeans.c	2015-03-14 15:35:45.664866097 +0100
Karsten Hopp 743caf
--- src/netbeans.c	2015-03-20 17:56:49.665289529 +0100
Karsten Hopp 743caf
***************
Karsten Hopp 743caf
*** 144,149 ****
Karsten Hopp 743caf
--- 144,154 ----
Karsten Hopp 743caf
      static void
Karsten Hopp 743caf
  nb_close_socket(void)
Karsten Hopp 743caf
  {
Karsten Hopp 743caf
+     buf_T	*buf;
Karsten Hopp 743caf
+ 
Karsten Hopp 743caf
+     for (buf = firstbuf; buf != NULL; buf = buf->b_next)
Karsten Hopp 743caf
+ 	buf->b_has_sign_column = FALSE;
Karsten Hopp 743caf
+ 
Karsten Hopp 743caf
  #ifdef FEAT_GUI_X11
Karsten Hopp 743caf
      if (inputHandler != (XtInputId)NULL)
Karsten Hopp 743caf
      {
Karsten Hopp 743caf
*** ../vim-7.4.668/src/screen.c	2015-03-20 17:16:23.656659419 +0100
Karsten Hopp 743caf
--- src/screen.c	2015-03-20 17:58:42.740014898 +0100
Karsten Hopp 743caf
***************
Karsten Hopp 743caf
*** 2214,2220 ****
Karsten Hopp 743caf
  {
Karsten Hopp 743caf
      return (wp->w_buffer->b_signlist != NULL
Karsten Hopp 743caf
  # ifdef FEAT_NETBEANS_INTG
Karsten Hopp 743caf
! 			    || netbeans_active()
Karsten Hopp 743caf
  # endif
Karsten Hopp 743caf
  		    );
Karsten Hopp 743caf
  }
Karsten Hopp 743caf
--- 2214,2220 ----
Karsten Hopp 743caf
  {
Karsten Hopp 743caf
      return (wp->w_buffer->b_signlist != NULL
Karsten Hopp 743caf
  # ifdef FEAT_NETBEANS_INTG
Karsten Hopp 743caf
! 				|| wp->w_buffer->b_has_sign_column
Karsten Hopp 743caf
  # endif
Karsten Hopp 743caf
  		    );
Karsten Hopp 743caf
  }
Karsten Hopp 743caf
*** ../vim-7.4.668/src/structs.h	2015-03-20 15:42:07.200377381 +0100
Karsten Hopp 743caf
--- src/structs.h	2015-03-20 17:58:09.836385801 +0100
Karsten Hopp 743caf
***************
Karsten Hopp 743caf
*** 1805,1810 ****
Karsten Hopp 743caf
--- 1805,1815 ----
Karsten Hopp 743caf
  
Karsten Hopp 743caf
  #ifdef FEAT_SIGNS
Karsten Hopp 743caf
      signlist_T	*b_signlist;	/* list of signs to draw */
Karsten Hopp 743caf
+ # ifdef FEAT_NETBEANS_INTG
Karsten Hopp 743caf
+     int		b_has_sign_column; /* Flag that is set when a first sign is
Karsten Hopp 743caf
+ 				    * added and remains set until the end of
Karsten Hopp 743caf
+ 				    * the netbeans session. */
Karsten Hopp 743caf
+ # endif
Karsten Hopp 743caf
  #endif
Karsten Hopp 743caf
  
Karsten Hopp 743caf
  #ifdef FEAT_NETBEANS_INTG
Karsten Hopp 743caf
*** ../vim-7.4.668/src/version.c	2015-03-20 17:36:38.618949214 +0100
Karsten Hopp 743caf
--- src/version.c	2015-03-20 17:54:53.422600714 +0100
Karsten Hopp 743caf
***************
Karsten Hopp 743caf
*** 743,744 ****
Karsten Hopp 743caf
--- 743,746 ----
Karsten Hopp 743caf
  {   /* Add new patch number below this line */
Karsten Hopp 743caf
+ /**/
Karsten Hopp 743caf
+     669,
Karsten Hopp 743caf
  /**/
Karsten Hopp 743caf
Karsten Hopp 743caf
-- 
Karsten Hopp 743caf
ARTHUR:  You fight with the strength of many men, Sir knight.
Karsten Hopp 743caf
         I am Arthur, King of the Britons.  [pause]
Karsten Hopp 743caf
         I seek the finest and the bravest knights in the land to join me
Karsten Hopp 743caf
         in my Court of Camelot.  [pause]
Karsten Hopp 743caf
         You have proved yourself worthy; will you join me?  [pause]
Karsten Hopp 743caf
         You make me sad.  So be it.  Come, Patsy.
Karsten Hopp 743caf
BLACK KNIGHT:  None shall pass.
Karsten Hopp 743caf
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp 743caf
Karsten Hopp 743caf
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 743caf
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 743caf
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 743caf
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///