]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.669 v7.4.669
authorBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 17:11:48 +0000 (18:11 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 17:11:48 +0000 (18:11 +0100)
Problem:    When netbeans is active the sign column always shows up.
Solution:   Only show the sign column once a sign has been added. (Xavier de
            Gaye)

src/buffer.c
src/edit.c
src/move.c
src/netbeans.c
src/screen.c
src/structs.h
src/version.c

index edb38d61c5f6266c9e3e09767987e0143e3c8445..6dfe007c28e0e4dfcaab57005032b0f98ff539a2 100644 (file)
@@ -5473,6 +5473,10 @@ insert_sign(buf, prev, next, id, lnum, typenr)
 
            /* first sign in signlist */
            buf->b_signlist = newsign;
+#ifdef FEAT_NETBEANS_INTG
+           if (netbeans_active())
+               buf->b_has_sign_column = TRUE;
+#endif
        }
        else
            prev->next = newsign;
index 610d0a36bd173f4d33af7901ac584635729e5fbd..9f7f1d6a284612627aa6d9408fcc492d9c60ba79 100644 (file)
@@ -6687,7 +6687,7 @@ comp_textwidth(ff)
 #ifdef FEAT_SIGNS
        if (curwin->w_buffer->b_signlist != NULL
 # ifdef FEAT_NETBEANS_INTG
-                           || netbeans_active()
+                         || curwin->w_buffer->b_has_sign_column
 # endif
                    )
            textwidth -= 1;
index e84f3d57e685be30e25b4f54cfcf265194cfbf13..02694123887ac89a11955e48323209e1b5a247bc 100644 (file)
@@ -905,7 +905,7 @@ win_col_off(wp)
            + (
 # ifdef FEAT_NETBEANS_INTG
                /* show glyph gutter in netbeans */
-               netbeans_active() ||
+               wp->w_buffer->b_has_sign_column ||
 # endif
                wp->w_buffer->b_signlist != NULL ? 2 : 0)
 #endif
index e9f791072f6b3fcf4d519bffeeabc18fc171660d..68ca301d0755ef5af4d24afbe3f023061d5ef2b6 100644 (file)
@@ -144,6 +144,11 @@ static int inAtomic = 0;
     static void
 nb_close_socket(void)
 {
+    buf_T      *buf;
+
+    for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+       buf->b_has_sign_column = FALSE;
+
 #ifdef FEAT_GUI_X11
     if (inputHandler != (XtInputId)NULL)
     {
index fd15ad18f3834c7083f18638be8c27866b38e99c..4e1fb36e0f99e17c8a5906a76defd7234abdd45d 100644 (file)
@@ -2214,7 +2214,7 @@ draw_signcolumn(wp)
 {
     return (wp->w_buffer->b_signlist != NULL
 # ifdef FEAT_NETBEANS_INTG
-                           || netbeans_active()
+                               || wp->w_buffer->b_has_sign_column
 # endif
                    );
 }
index 448697a4a6a610ea216ec5768923bae77e0f59e5..3b24eec033fa2a37c78bc73e5e90b54d3c95f47b 100644 (file)
@@ -1805,6 +1805,11 @@ struct file_buffer
 
 #ifdef FEAT_SIGNS
     signlist_T *b_signlist;    /* list of signs to draw */
+# ifdef FEAT_NETBEANS_INTG
+    int                b_has_sign_column; /* Flag that is set when a first sign is
+                                   * added and remains set until the end of
+                                   * the netbeans session. */
+# endif
 #endif
 
 #ifdef FEAT_NETBEANS_INTG
index c5e8a152a8e3062a4e440cce73a81665d0665492..f7eae8501a0d9890a6c6ba5b96da7975ead72aae 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    669,
 /**/
     668,
 /**/