Mercurial > vim
changeset 6689:97cc4ee3e095 v7.4.669
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 20 Mar 2015 18:11:48 +0100 |
parents | a2bcc773cfa0 |
children | f861a3682c95 |
files | src/buffer.c src/edit.c src/move.c src/netbeans.c src/screen.c src/structs.h src/version.c |
diffstat | 7 files changed, 19 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.c +++ b/src/buffer.c @@ -5473,6 +5473,10 @@ insert_sign(buf, prev, next, id, lnum, t /* 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;
--- 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;
--- 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
--- 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) {
--- 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 ); }
--- 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