Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1724: minor syntax colouring glitch
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

SamHocevar
Junior Member

France
15 Posts

Posted - Jun 24 2009 :  09:00:16 AM  Show Profile  Reply with Quote
In a C++ file, if I write the following code:
for(type variable = 0; /* whatever */; /* whatever */)

The first letters of the first occurrence of "variable" are displayed in the same font and colour as "for", "int", "return" and other similar keywords rather than the expected formating when "variable" starts with a substring of "type" followed by a number, by "_", or by end-of-word.

For instance, in
for(double bl8 = 1.0; bl8 < 10.0; bl8 *= 1.1)
the "bl" part of "bl8" is wrongly rendered. It also works with storage specifiers:
for(volatile int tile_count = 0; tile_count < 256; tile_count++)
wrongly renders the "tile" part of "tile_count" because it is a substring of "volatile". Similarly,
long const con_de_mime
wrongly renders "con" because it is a substring of "const".

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jun 25 2009 :  12:09:42 PM  Show Profile  Reply with Quote
using VS2005 and VA 1727 I am not seeing anything "odd", this is what I am seeing:



Which IDE and version of VA are you using?

zen is the art of being at one with the two'ness
Go to Top of Page

SamHocevar
Junior Member

France
15 Posts

Posted - Jun 25 2009 :  12:30:09 PM  Show Profile  Reply with Quote
I am using VS2008 Professional 9.0.307291.1 SP and VAX 10.5.1724.0 build 2009.05.01. Here is what I see:

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jun 25 2009 :  3:55:19 PM  Show Profile  Reply with Quote
Most odd and unexpected. Is the edit window scrolled sideways when you see this effect?

As an initial test can you please try turning off:

VA Options -> Advanced -> Fonts and Colors -> Apply Colouring to -> Text Editors

and see what effect, if any, this has?

zen is the art of being at one with the two'ness
Go to Top of Page

SamHocevar
Junior Member

France
15 Posts

Posted - Jun 26 2009 :  04:40:48 AM  Show Profile  Reply with Quote
The edit window shows a horizontal scrollbar but it is at its default, leftmost position.

Here is what I get when disabling "Apply Colouring to Text Editors" (I exaggerated the variable colouring for better contrast):


And here is what I get when I disable VAX completely:
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jun 26 2009 :  2:49:04 PM  Show Profile  Reply with Quote
That really does not make sense. Turning off VA colouring to the text editor should do just that, not this.

Which OS are you using?
Are you able to reproduce the problem in a new, default C++ solution? It is possible it is somehow solution specific.

Can you please export your VA and IDE settings and send them to me:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

I can then import them here and see if I can reproduce the problem. Please submit the files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up.

zen is the art of being at one with the two'ness
Go to Top of Page

SamHocevar
Junior Member

France
15 Posts

Posted - Jun 26 2009 :  5:51:43 PM  Show Profile  Reply with Quote
The OS is Vista 64 (not sure about which edition). This happens with any C or C++ solution I was using before installing VAX, but also with a brand new solution (opening Visual Studio and creating a new C++ file).

I am afraid the system is at my workplace; I won't be able to send you the configuration files until Monday.

Edited by - SamHocevar on Jun 26 2009 5:52:05 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jun 27 2009 :  12:08:29 PM  Show Profile  Reply with Quote
Its not simply an OS specific problem, since I am not seeing any problems on a Vista 64bit machine. I will re-try with your settings, and see if they help. All very strange.

zen is the art of being at one with the two'ness
Go to Top of Page

SamHocevar
Junior Member

France
15 Posts

Posted - Jun 30 2009 :  10:03:04 AM  Show Profile  Reply with Quote
I uploaded both configuration files this morning. Feel free to ask for any other information.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jul 02 2009 :  3:02:18 PM  Show Profile  Reply with Quote
I have the files, thank you for these:

case=28997

I have reproduced the problem here. It required an IDE restart after importing the IDE settings to trigger, which is unexpected. I am currently trying to work out what is going on here.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jul 02 2009 :  4:07:25 PM  Show Profile  Reply with Quote
I think you are using a font I do not have installed. Can you try going into the IDE Font and Colour settings and turning off Bold for "plain text" and see if this fixes the problem?

It fixes it for me, but I am not sure quite how similar my system is to yours.

I have put in a bug report for what I am seeing:

case=29131

zen is the art of being at one with the two'ness
Go to Top of Page

SamHocevar
Junior Member

France
15 Posts

Posted - Jul 03 2009 :  05:17:00 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

I think you are using a font I do not have installed. Can you try going into the IDE Font and Colour settings and turning off Bold for "plain text" and see if this fixes the problem?

It does fix the problem, yes. And it remains perfectly usable since I can activate bold in VAX instead. Thanks!

The font I am using is Consolas. It's the only monospaced Vista font with a slashed zero.
Go to Top of Page

drac
Senior Member

Germany
49 Posts

Posted - Jul 03 2009 :  05:55:21 AM  Show Profile  Reply with Quote
quote:
Originally posted by SamHocevar
The font I am using is Consolas. It's the only monospaced Vista font with a slashed zero.



You might want to have a look at http://www.codeproject.com/KB/work/FontSurvey.aspx
I personally use DejaVu Sans Mono.

I wonder on how many of these does VA fail.
Go to Top of Page

SamHocevar
Junior Member

France
15 Posts

Posted - Jul 03 2009 :  07:47:03 AM  Show Profile  Reply with Quote
quote:
Originally posted by drac
You might want to have a look at http://www.codeproject.com/KB/work/FontSurvey.aspx
I personally use DejaVu Sans Mono.


Thanks. I always use DejaVu Sans on Linux, and from that page it seems that no other font will suit my taste, but for some reason it never occurred to me to install it on Windows :-)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jul 03 2009 :  5:04:00 PM  Show Profile  Reply with Quote
I did not expect you to be using Consolas, since when I first imported your settings I ended up with italic text everywhere in the editor, which normally suggests something funny with the fonts, e.g. trying to use a font that Windows does not recognise.

drac this specific problem shows up with standard IDE font's, it seems to be related to having lots of things set to bold. I am not sure why, but painting the text in the editor is not an exact science If you run into any font specific problems then I would like to hear about them so we can try to get them fixed.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000