On Di, 11 Jan 2011, Christian Brabandt wrote:
> On Tue, January 11, 2011 5:25 pm, Ben Fritz wrote:
> > On Jan 10, 10:25 am, AK <[email protected]> wrote:
> >> I suspect this isn't possible in current vim but I'm wondering if it's
> possible to add this to the next version.. Currently, if you have a
> marks column and a folded line, marks column is blocked and overwritten
> with a blank background of folded column.
> >> When you have many folded functions or classes, that looks really ugly.
> I think majority of people would prefer either to have contents of mark
> of 1st folded line there or at least blank space of the same colour of
> marks column.
> >
> > What is the "marks column"? Is it some plugin you have installed? And
> can you post a screenshot? I really am having trouble picturing what you
> are describing.
>
> I think, if you have defined a sign in a line and this line is folded away
> the sign won't be shown. I can reproduce it here.
>
> I would consider this a bug, therefore forwarding to vim-dev.
I think, the attached patch fixes it.
regards,
Christian
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff --git a/src/screen.c b/src/screen.c
--- a/src/screen.c
+++ b/src/screen.c
@@ -2283,16 +2283,58 @@
len = W_WIDTH(wp) - col;
if (len > 0)
{
+ int text_sign;
+ char_u *p_extra = NULL;
+ int attr = -1;
+#ifdef FEAT_SIGN_ICONS
+ int icon_sign;
+#endif
if (len > 2)
len = 2;
+ text_sign = buf_getsigntype(wp->w_buffer, lnum,
+ SIGN_TEXT);
+#ifdef FEAT_SIGN_ICONS
+ icon_sign = buf_getsigntype(wp->w_buffer, lnum,
+ SIGN_ICON);
+ if (gui.in_use && icon_sign != 0)
+ {
+ attr = SIGN_BYTE;
+#ifdef FEAT_NETBEANS_INTG
+ if (buf_signcount(wp->w_buffer, lnum) > 1)
+ attr = MULTISIGN_BYTE;
+#endif
+ ScreenAttrs[off + col] =
+ ScreenAttrs[off + col + 1 ] = attr;
+ ScreenLines[off + col] =
+ ScreenLines[off + col + 1] = icon_sign;
+#ifdef FEAT_MBYTE
+ if (enc_utf8)
+ ScreenLinesUC[off + col] =
+ ScreenLinesUC[off + col + 1] = 0;
+#endif
+ }
+ else
+#endif
+ {
+ p_extra = sign_get_text(text_sign);
+ if (p_extra != NULL)
+ len = STRLEN(p_extra);
+ else
+ p_extra = (char_u *) " ";
+ attr = sign_get_attr(text_sign, FALSE);
+ if (attr == -1 || text_sign == 0)
+ attr = hl_attr(HLF_SC);
+
+ if (len > 2)
+ len = 2;
# ifdef FEAT_RIGHTLEFT
- if (wp->w_p_rl)
- /* the line number isn't reversed */
- copy_text_attr(off + W_WIDTH(wp) - len - col,
- (char_u *)" ", len, hl_attr(HLF_FL));
- else
-# endif
- copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_FL));
+ if (wp->w_p_rl)
+ /* the line number isn't reversed */
+ copy_text_attr(off + W_WIDTH(wp) - len - col, p_extra, len, attr);
+ else
+# endif
+ copy_text_attr(off + col, p_extra, len, attr);
+ }
col += len;
}
}