summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-03-20 18:11:48 +0100
committerBram Moolenaar <Bram@vim.org>2015-03-20 18:11:48 +0100
commit3b7b83649cd9c486afd6fbdb33e4450616c4bd46 (patch)
tree9e9bd3991381ea19ee668ea51d648b4c30b52f4e
parent825e7ab423ce34a57f4819cc3745246246f38081 (diff)
downloadvim-3b7b83649cd9c486afd6fbdb33e4450616c4bd46.zip
updated for version 7.4.669
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)
-rw-r--r--src/buffer.c4
-rw-r--r--src/edit.c2
-rw-r--r--src/move.c2
-rw-r--r--src/netbeans.c5
-rw-r--r--src/screen.c2
-rw-r--r--src/structs.h5
-rw-r--r--src/version.c2
7 files changed, 19 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index edb38d61c..6dfe007c2 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -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;
diff --git a/src/edit.c b/src/edit.c
index 610d0a36b..9f7f1d6a2 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -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;
diff --git a/src/move.c b/src/move.c
index e84f3d57e..026941238 100644
--- a/src/move.c
+++ b/src/move.c
@@ -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
diff --git a/src/netbeans.c b/src/netbeans.c
index e9f791072..68ca301d0 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -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)
{
diff --git a/src/screen.c b/src/screen.c
index fd15ad18f..4e1fb36e0 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -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
);
}
diff --git a/src/structs.h b/src/structs.h
index 448697a4a..3b24eec03 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -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
diff --git a/src/version.c b/src/version.c
index c5e8a152a..f7eae8501 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 669,
+/**/
668,
/**/
667,