On Sun, Dec 05, 2021 at 05:43:17PM +0000, Bram Moolenaar wrote:
> 
> 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.

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB

-- 
-- 
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/20211205174907.nfxy4jwxvlqt4kao%40localhost.

Raspunde prin e-mail lui