ShaderEditor icon indicating copy to clipboard operation
ShaderEditor copied to clipboard

Syntax highlighting disappeared

Open fekga opened this issue 7 years ago • 2 comments

I moved some code around in my main function and syntax highlighting was gone. I couldn't reproduce it yet. The only way to restore highlighting was to restart the application.

Here's the resulting code after a paste:

void main()
{
	vec4 buf=texture(backbuffer,gl_FragCoord.xy/resolution);
	if(true
	//	&&texture(backbuffer,vec2(.0)).rgb==vec3(.0) //workaround for rendering only one frame
		)
	fc=vec4(render(),1.);
	else
	fc=buf;
	if(gl_FragCoord.xy==vec2(.0))
	fc.rgb=vec3(.0);
}

I tried to create a workaround to be able to render only one frame as this is not a feature in the application.

fekga avatar Feb 01 '18 10:02 fekga

Hm, that's odd. Unfortunately, I cannot reproduce the problem with this snippet and I have no idea what may cause syntax highlighting to stop ... 🤔Maybe it's an invisible character? Did you copy/paste from another app? Syntax highlighting works with regular expressions so that's quite reliable normally. Do you use the Beta version or the official one (2.9.1)?

By the way, I'll soon try to add the feature of rendering only one frame too.

markusfisch avatar Feb 01 '18 12:02 markusfisch

I'm using the Beta version and I just reordered the lines in the function with a simple cut & paste. There was no code imported from a different source.

2018-02-01 13:19 GMT+01:00 Markus Fisch [email protected]:

Hm, that's odd. Unfortunately, I cannot reproduce the problem with this snippet and I have no idea what may cause syntax highlighting to stop ... 🤔Maybe it's an invisible character? Did you copy/paste from another app? Syntax highlighting works with regular expressions so that's quite reliable normally. Do you use the Beta https://play.google.com/apps/testing/de.markusfisch.android.shadereditor version or the official one (2.9.1)?

By the way, I'll soon try to add the feature of rendering only one frame too.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/markusfisch/ShaderEditor/issues/75#issuecomment-362249648, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpvKHSHNV2L4jPFwy4eWRE2bRiFG3Q6ks5tQavrgaJpZM4R1YBF .

fekga avatar Feb 01 '18 12:02 fekga