a problem with syntax highlighting in regexp.c

11 views
Skip to first unread message

Charles Campbell

unread,
Jul 14, 2011, 2:33:19 PM7/14/11
to vim...@vim.org
Hello,

I'm probably doing something wrong, but I can't see what it is. So:

I extracted a couple of lines from regexp.c (143,144): (vim 7.3.244)

#define BRANCH 3 /* node Match this alternative, or the
* next... */

and put them in a file "junk.c". Then

vim -u NONE -N --noplugin junk.c
:syn on

shows the comment-ending pair of characters, */, in error highlighting.

FYI: I found this due to my looking at line 2045, (2044,2045)

EMSG_M_RET_NULL(_("E71: Invalid character after %s%%"),
reg_magic == MAGIC_ALL);

and I noticed a bunch of error highlighting of going on and so looked
for the first such example.

Are others seeing this?

Regards,
Chip Campbell

Thilo Six

unread,
Jul 14, 2011, 3:36:55 PM7/14/11
to vim...@vim.org
Charles Campbell wrote the following on 14.07.2011 20:33

> Hello,
>
> I'm probably doing something wrong, but I can't see what it is. So:
>
> I extracted a couple of lines from regexp.c (143,144): (vim 7.3.244)

here 7.2.445 with 'syntax/c.vim' from mercurial

> #define BRANCH 3 /* node Match this alternative, or the
> * next... */
>
> and put them in a file "junk.c". Then
>
> vim -u NONE -N --noplugin junk.c
> :syn on
>
> shows the comment-ending pair of characters, */, in error highlighting.
>
> FYI: I found this due to my looking at line 2045, (2044,2045)
>
> EMSG_M_RET_NULL(_("E71: Invalid character after %s%%"),
> reg_magic == MAGIC_ALL);
>
> and I noticed a bunch of error highlighting of going on and so looked
> for the first such example.
>
> Are others seeing this?

sorry no. Comments are displayed just normal.
With cursor being on '/*' or '*/' i see with :HLT!
SynStack: cDefine->cComment->cCommentStart

between it's 'SynStack: cDefine->cComment' both sounds fine.

> Regards,
> Chip Campbell


HTH
--
bye Thilo

4096R/0xC70B1A8F
721B 1BA0 095C 1ABA 3FC6 7C18 89A4 A2A0 C70B 1A8F


Ben Schmidt

unread,
Jul 15, 2011, 8:45:21 PM7/15/11
to vim...@googlegroups.com, Charles Campbell
> I extracted a couple of lines from regexp.c (143,144): (vim 7.3.244)
>
> #define BRANCH 3 /* node Match this alternative, or the
> * next... */
>
> and put them in a file "junk.c". Then
>
> vim -u NONE -N --noplugin junk.c
> :syn on
>
> shows the comment-ending pair of characters, */, in error highlighting.

No problem for me with Vim 7.3.219 and an updated syntax/c.vim which
hasn't made it into the official runtimes yet.

> FYI: I found this due to my looking at line 2045, (2044,2045)

No problems around that area for me either.

So, if it's a bug, it's a new one!

Ben.

Charles E Campbell Jr

unread,
Jul 16, 2011, 1:49:03 PM7/16/11
to vim...@googlegroups.com
Well, a strange situation (its doing the same thing on my home computer,
too, which is 7.3.244, although I'm about to update it)

Regards,
Chip Campbell

Charles Campbell

unread,
Jul 18, 2011, 10:07:52 AM7/18/11
to vim...@googlegroups.com
I've partially located the problem: its occurring due to Michael Gedde's
ifdef.vim script. Strange that --noplugin doesn't prevent
$HOME/.vim/after/... plugin loading, though.

Regards,
Chip Campbell

Reply all
Reply to author
Forward
0 new messages