1. synconcealed() does not actually allow to find out the concealed region:
Consider the following code:
vim -u NONE -c 'call setline(".", "alpha")' \
-c 'syntax match Error /alpha/ conceal cchar=a' \
-c 'syntax match PreProc /p/ contained containedin=Error' \
-c 'set concealcursor=n cole=2' \
-c 'echo map(range(1, col("$")),
"synconcealed(".line(".").",v:val)")'
. You will see that the third element in the list contains [1, '', 1],
previous one contains [1, 'a', 0] and next one contains [1, 'a', 0], but what
is actually displayed is *one* 'a'.
2. If you replace `cole=2` in the above code with `cole=1` then `alpha` will
appear as `a-a`, but PreProc group does not have conceal attribute.
3. [DOC BUG] With an addition of
-c $'call feedkeys(\':echomsg
string(synconcealed(line("."),col(".")))\nl:echomsg
string(synconcealed(line("."),col(".")))\n\', "t")'
you will see [1, 'a', 6] and [1, 'a', 11] while expected two exactly the
same lists. It looks like at least redraw alters these numbers, but I managed
to get same result with script that has a bunch of ex commands between
synconcealed() calls without commands that should cause redraw. Documentation
update on what causes number to change is needed.
--
--
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].
For more options, visit https://groups.google.com/groups/opt_out.