On Thu, May 4, 2017 at 12:58 PM, Christian Brabandt <[email protected]> wrote: > > On Do, 04 Mai 2017, Tony Mechelynck wrote: > >> Something must have gone wrong. >> >> After adding that custom syntax script, the string '<!-- Щ&М -->' >> present in register x, register /, and as the whole contents of the >> cursor line, is shown as <↔↔↔> instead. After removing the syntax >> script, it is (spontaneously) displayed normally again. Apart from >> comments, I had written that html.vim syntax file as (IIRC) >> >> if &enc =~? '^u' && has('conceal') && exists('*matchadd') >> call matchadd('Conceal', "\%uad", 10, -1, {'conceal': '↔'}) > > "\uad" >> set conceallevel=2 concealcursor=nvic >> endif >> >> I didn't try to move the cursor away from that line but I noticed that >> actual soft-hyphens some lines down did not appear as ↔
Same result with '\%uad' or '\%xad' (both with single quotes) or "\xad" (with double quotes). The problem disappears, of course, when I manually do :setlocal conceallevel=0. There already is a 3match (by <:> added to 'matchpairs') at the cursor where the problem happens; moving the cursor away hides the < and > but the double-arrows remain. The conceal character is U+2194, or UTF-8 E2 86 94. Might explain the fact that the apparent length of the string (which uses ASCII and Cyrillic characters requiring only 1 or 2 bytes ech) is reduced but not the fact that the match happens where it shouldn't, or that id doesn't happen where it should. Since this is an after-syntax script, maybe I should use :syntax match rather than :call matchadd() ? See you later, I have to go. Best regards, Tony. -- -- 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/d/optout.
