On Wed, Jun 26, 2019 at 9:55 PM Bram Moolenaar <
Br...@moolenaar.net> wrote:
>
> Yegappan wrote:
>
> > When multiple signs with icons are placed on the same line, then a
> > different icon is drawn in the sign column using the
> > netbeans_draw_multisign_indicator() function.
> > This function draws the icon only if a netbeans connection is
> > present (NETBEANS_OPEN).
> >
> > The screen line refresh function (win_line) always checks whether
> > multiple signs are present on a line using the buf_signcount() function.
> > This function counts the number of signs with icons placed on a line.
> > This is done even though the netbeans connection is not present.
> > If the netbeans connection is not present, then there is no need to
> > count the number of signs as the multisign indicator will not be
> > displayed.
> >
> > Does anyone see a problem if I change win_line() to call buf_signcount()
> > only if the netbeans connection is present?
>
> I haven't checked the default, but in general the behavior should not
> change by only compiling with netbeans, it should actually be using
> netbeans. Which isn't very often these days.
>
With this change, the default behavior is not changing. The unnecessary
call to buf_signcount() is getting removed. The call to buf_signcount()
is expensive and is not necessary. When multiple signs are placed on
used. This includes the icon of that sign. So this is a safe change.