Sublime Forum

[ST3] Syntax highlighting broken in long C++ sources

#1

Hi,
I’m using the latest ST3 developer build and I noticed an annoying bug.
I have a C++ file implementing a state machine which consists of roughly 20+ inline C++ class definitions in about 800 lines of code.

With ST2 I could work with this file just fine and the syntax and scope was detected down to the very last line.
ST3 however stops highlighting (and as it looks to me) scope detection somewhere after about half of my code.

I can reproduce this even with a sample file containing a dummy of what my code looks like but using only empty states.
Each class resembles something like this:

class SubStateXX : public BaseState //{{{
{
public:
	SubStateXX( StateID id )
	  : BaseState( id ) {};

	virtual void OnEntry()
	{
	};

	virtual void OnExit()
	{
	};

	virtual StateID OnEvent( EventType event )
	{
		switch( event )
		{
		}
		return GetSuperState();
	};
}; //}}}

I’ve attached my sample file - for me highlighting around line 460 in ST3 and works without error in ST2.

0 Likes