James McCoy wrote:

> > > On Sun, Dec 05, 2021 at 01:03:15PM +0000, Bram Moolenaar wrote:
> > > > 
> > > > Patch 8.2.3743
> > > > Problem:    ":sign" can add a highlight group without a name.
> > > > Solution:   Give an error if the group name is missing. (closes #9280)
> > > > Files:      src/sign.c, src/errors.h, src/testdir/test_signs.vim
> > > 
> > > This removes a useful capability.  If I've defined a sign as such:
> > > 
> > >   sign define Foo linehl=FooLine texthl=FooText
> > > 
> > > and then want to remove the linehl, I could run
> > > 
> > >   sign define foo linehl= texthl=FooText
> > > 
> > > Now, I have to instead undefine the sign and then define it again.
> > > 
> > > This patch causes plugins, like Signify, to error now.
> > 
> > I see.  Removing the highlight for a defined sign should be OK.
> > But defining a sign the first time with an empty highlight should still
> > be an error, right?
> 
> Why?  That complicates the plugin code the same way as dealing with this
> patch already would.  Whether a certain attribute is being defined or
> not by the plugin can change during runtime.
> 
> With this patch, any plugin doing that now needs to either always
> undefine signs before placing them or track whether attributes are set
> and adjust their calls accordingly.

Can you give an example of how an empty highlight argument can be
useful?

-- 
EXPERIENCE - experience is a wonderful thing. It enables you to 
recognise a mistake when you make it again.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211205183839.687FC1C0BD1%40moolenaar.net.

Raspunde prin e-mail lui