Bug#441785: Umlauts break syntax highlighting

martin f krafft madduck at debian.org
Wed Sep 12 14:58:56 UTC 2007


I boiled down the problem to the vimoutliner syntax definition:

  :syntax region OL2 start=+^\t[^:\t]+ end=+^\t[^:\t]+me=e-2
  contains=outlTags,BT2,BT3,PT2,PT3,TA2,TA3,UT2,UT3,UB2,UB3,spellErr,SpellErrors,BadWord,OL3
  keepend

The problem here is the offset for end: me=e-2. This basically means
that at level 2 (one leading tab), the match region ends on the
first character that's also at level 2 (unless it encounters a match
region not in the set specified by contains), minus 2 (the character
and the leading tab).

Vim seems to use bytes instead of characters here though: the syntax
highlighting only breaks when a UTF8 character is the first of the
heading, in which case the me=e-2 offset somehow gets lost and the
OL2 region is extended to the *next* level 2 heading.

Using me=e-3 or me=e-1 both work, which really does not make sense
to me.

Sven, this remains a bug in vim, I think, and I don't see a way to
work around it in vimoutliner. If you want to help fix it, bring up
the issue on the vim mailing list (and CC this bug report).

-- 
 .''`.   martin f. krafft <madduck at debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20070912/5483d7bc/attachment.pgp 


More information about the pkg-vim-maintainers mailing list