@@ -3042,7 +3042,8 @@ text_prop_compare(const void *s1, const void *s2)
30423042get_sign_display_info (
30433043 int nrcol ,
30443044 win_T * wp ,
3045- linenr_T lnum ,
3045+ linenr_T lnum UNUSED ,
3046+ sign_attrs_T * sattr ,
30463047 int wcr_attr ,
30473048 int row ,
30483049 int startrow ,
@@ -3077,9 +3078,9 @@ get_sign_display_info(
30773078#endif
30783079 )
30793080 {
3080- text_sign = buf_getsigntype ( wp -> w_buffer , lnum , SIGN_TEXT ) ;
3081+ text_sign = ( sattr -> text != NULL ) ? sattr -> typenr : 0 ;
30813082# ifdef FEAT_SIGN_ICONS
3082- icon_sign = buf_getsigntype ( wp -> w_buffer , lnum , SIGN_ICON ) ;
3083+ icon_sign = ( sattr -> icon != NULL ) ? sattr -> typenr : 0 ;
30833084 if (gui .in_use && icon_sign != 0 )
30843085 {
30853086 // Use the image in this position.
@@ -3093,7 +3094,7 @@ get_sign_display_info(
30933094 else
30943095 * c_extrap = SIGN_BYTE ;
30953096# ifdef FEAT_NETBEANS_INTG
3096- if (buf_signcount (wp -> w_buffer , lnum ) > 1 )
3097+ if (netbeans_active () && ( buf_signcount (wp -> w_buffer , lnum ) > 1 ) )
30973098 {
30983099 if (nrcol )
30993100 {
@@ -3114,7 +3115,7 @@ get_sign_display_info(
31143115# endif
31153116 if (text_sign != 0 )
31163117 {
3117- * pp_extra = sign_get_text ( text_sign ) ;
3118+ * pp_extra = sattr -> text ;
31183119 if (* pp_extra != NULL )
31193120 {
31203121 if (nrcol )
@@ -3127,7 +3128,7 @@ get_sign_display_info(
31273128 * c_finalp = NUL ;
31283129 * n_extrap = (int )STRLEN (* pp_extra );
31293130 }
3130- * char_attrp = sign_get_attr ( text_sign , FALSE) ;
3131+ * char_attrp = sattr -> texthl ;
31313132 }
31323133 }
31333134}
@@ -3264,6 +3265,8 @@ win_line(
32643265#endif
32653266#if defined(FEAT_SIGNS ) || defined(FEAT_QUICKFIX ) \
32663267 || defined(FEAT_SYN_HL ) || defined(FEAT_DIFF )
3268+ int sign_present = FALSE;
3269+ sign_attrs_T sattr ;
32673270# define LINE_ATTR
32683271 int line_attr = 0 ; /* attribute for the whole line */
32693272#endif
@@ -3585,12 +3588,15 @@ win_line(
35853588 filler_todo = filler_lines ;
35863589#endif
35873590
3591+ #ifdef FEAT_SIGNS
3592+ sign_present = buf_get_signattrs (wp -> w_buffer , lnum , & sattr );
3593+ #endif
3594+
35883595#ifdef LINE_ATTR
35893596# ifdef FEAT_SIGNS
35903597 /* If this line has a sign with line highlighting set line_attr. */
3591- v = buf_getsigntype (wp -> w_buffer , lnum , SIGN_LINEHL );
3592- if (v != 0 )
3593- line_attr = sign_get_attr ((int )v , TRUE);
3598+ if (sign_present )
3599+ line_attr = sattr .linehl ;
35943600# endif
35953601# if defined(FEAT_QUICKFIX )
35963602 /* Highlight the current line in the quickfix window. */
@@ -3974,8 +3980,8 @@ win_line(
39743980 /* Show the sign column when there are any signs in this
39753981 * buffer or when using Netbeans. */
39763982 if (signcolumn_on (wp ))
3977- get_sign_display_info (FALSE, wp , lnum , wcr_attr , row ,
3978- startrow , filler_lines , filler_todo , & c_extra ,
3983+ get_sign_display_info (FALSE, wp , lnum , & sattr , wcr_attr ,
3984+ row , startrow , filler_lines , filler_todo , & c_extra ,
39793985 & c_final , extra , & p_extra , & n_extra , & char_attr );
39803986 }
39813987#endif
@@ -3997,11 +4003,10 @@ win_line(
39974003 // in 'lnum', then display the sign instead of the line
39984004 // number.
39994005 if ((* wp -> w_p_scl == 'n' && * (wp -> w_p_scl + 1 ) == 'u' )
4000- && buf_findsign_id (wp -> w_buffer , lnum ,
4001- (char_u * )"*" ) != 0 )
4002- get_sign_display_info (TRUE, wp , lnum , wcr_attr , row ,
4003- startrow , filler_lines , filler_todo , & c_extra ,
4004- & c_final , extra , & p_extra , & n_extra ,
4006+ && sign_present )
4007+ get_sign_display_info (TRUE, wp , lnum , & sattr , wcr_attr ,
4008+ row , startrow , filler_lines , filler_todo ,
4009+ & c_extra , & c_final , extra , & p_extra , & n_extra ,
40054010 & char_attr );
40064011 else
40074012#endif
0 commit comments