Hi,
On Tue, Oct 26, 2021 at 9:43 AM lacygoill <[email protected]> wrote:
> Could hlget() accept an extra optional boolean parameter to make it
> automatically resolve links?
>
I have updated the PR to add support for this.
- Yegappan
> :echo hlget('Group', v:true)[0]
> ^----^
>
> Otherwise, we might have to use a while loop which makes the code more
> verbose:
>
> vim9scripthlset([{name: 'A', linksto: 'B'}])hlset([{name: 'B', linksto:
> 'C'}])hlset([{'ctermfg': '4', 'name': 'C', 'term': {'bold': v:true}, 'guifg':
> 'Blue'}])var hl: dict<any> = hlget('A')[0]while hl->has_key('linksto')
> hl = hlget(hl.linksto)->get(0, {})endwhileecho hl
>
> {'id': 56, 'ctermfg': '4', 'name': 'C', 'term': {'bold': true}, 'guifg':
> 'Blue'}
>
>
>
--
--
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/CAAW7x7nxWMPAnsbU_nhdw13PK2Soo5xQ9Rz4xJi0hGufkUO19Q%40mail.gmail.com.