Hi,
On Thu, Nov 11, 2021 at 5:20 AM lacygoill <[email protected]> wrote:
> Thank you very much for the quick PR, I'm going to test it as soon as I
> can.
> ------------------------------
>
> I noticed two other possible issues for which I would like your opinion.
>
> Issue 1: hlset() can't emulate the bang of :highlight!.
> Issue 2: hlget() does not give any information for the default argument
> of a linked highlight group.
>
Thanks for the detailed feedback. I have updated the PR to add support for
these.
Can you try the updated PR and let me know if you see any problems?
Regards,
Yegappan
> With regards to issue 1:
>
> vim9scripthighlight MyGroup ctermbg=greenhlset([{name: 'MyGroup', linksto:
> 'ErrorMsg'}])highlight MyGroup
>
> MyGroup xxx ctermbg=10
>
> Notice that the link was not installed. I think that's because hlset()
> operates like :highlight by default; not like :highlight!. I've read :help
> hlget() <https://vimhelp.org/eval.txt.html#hlget%28%29> and :help hlset()
> <https://vimhelp.org/eval.txt.html#hlset%28%29>, but couldn't find any
> key allowing us to emulate the bang.
>
> This means that there exists an operation that :highlight can perform but
> not hlset():
>
> vim9scripthighlight MyGroup ctermbg=greenhighlight! link MyGroup
> ErrorMsghighlight MyGroup
>
> MyGroup xxx ctermbg=10
> links to ErrorMsg
>
> Shouldn't hlset() provide all the features of :highlight?
>
> With regards to issue 2:
>
> vim9script
> [{name: 'MyGroup', linksto: 'ErrorMsg'}]->hlset()highlight clear
> MyGrouphighlight MyGroup
>
> MyGroup xxx cleared
>
> Notice that MyGroup has been cleared. This means that when hlset()
> defines a group with a link, it does not use default. How are we supposed
> to tell hlset() that we do want default? Shouldn't it accept a boolean
> key like default_link?
> ------------------------------
>
> If you consider all of this as valid, I can open separate issues; let me
> know. Thank you again for your work on these very useful functions.
>
>
>
--
--
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/CAAW7x7n2dFAiKYwQ9oEz4xyYDo1013zb69_Dj09k6J1GoYwkfA%40mail.gmail.com.