Incorrect variable highlighting.

Discussion about CodeLite development process and patches
Prostoy Paren
CodeLite Curious
Posts: 3
Joined: Wed Jun 12, 2013 12:36 am
Genuine User: Yes
IDE Question: C++
Contact:

Incorrect variable highlighting.

Post by Prostoy Paren »

CodeLite 5.1 downloaded from sourceforge. Windows7.

Variable 'VertLabSz' is incorrect highlighted in the code below:

Code: Select all

#include <stdio.h>
#define ERRVAL 0

int main(int argc, char **argv)
{
	int HorizLabSz = ERRVAL, VertLabSz = ERRVAL;
	
	printf( "%i, %i", HorizLabSz, VertLabSz);
	
	return 0;
}

I've tried to upload attachment screenshot, but unsuccessfully. On this screenshot variable 'HorizLabSz' colored as 'Syntax Highlight/Customize/Local variables', but the 'VertLabSz' colored as 'Syntax Highlight/Customize/Identifier'.


Prostoy Paren
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Incorrect variable highlighting.

Post by solewalker »

I too was able to reproduce this bug with codelite 5.2 on windows 7. I noticed it before, but did not think much about it as I don't declare multiple variables in a single line. Here is a screenshot
Image

Simple fix is to declare them in multiple line like below, its also a good coding convention to follow.
Image
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Incorrect variable highlighting.

Post by eranif »

There is a bug open for this in SF

Eran
Make sure you have read the HOW TO POST thread
Post Reply