[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#241342: zed: C/C++ syntax highlighting catches too much



Package: zed
Version: 1.0.5-8
Severity: normal
Tags: patch

If a normal token begins with a keyword, the keyword portion is highlighted. 
Here's an example:

  if (format) { foo(); }

This fixes the problem:

  --- edvis.cc.orig       2000-04-05 02:36:20.000000000 -0700
  +++ edvis.cc    2004-03-31 14:44:56.000000000 -0800
  @@ -135,7 +135,7 @@
   
        while(*i!='\0')
        {
  -      if (memcmp(p,i+1,(int)(*i-'0'))==0)
  +      if (memcmp(p,i+1,(int)(*i-'0'))==0 && !isalnum(p[*i-'0']))
         { ava=(int)(*i-'0'); save1=ava; stato=12; break; }
         i+=(int)(*i-'0')+1;
        }




Reply to: