face-hh/griddycode

Quotes unproperly highlit in Linux

Opened this issue · 14 comments

Describe the bug
Quotes are unproperly highlit for JS: opening a singlequote or a doublequote causes the rest of the line to be colored in quotes

To Reproduce
Steps to reproduce the behavior:

  1. Create a JavaScript (not sure if exclusive to JS) file
  2. Type (Minimal reproducible example, among others):
console.log('hello' + 54321);
console.log("hello" + 54321);
console.log(54321);

Expected behavior
The 54321 should have the same color everywhere, so should the parentheses

Screenshots
image

Desktop (please complete the following information):

  • OS: Arch Linux
  • Version v1.2.0

Cannot replicate in 1.2.0
image

With the example code you left:
image

Just curious, are you running under Linux or Windows (or was it self-built)? It could be that the binary shipped for Linux includes a version of godot with a broken lineonly

Cannot replicate in 1.2.0 image

With the example code you left: image

Howdy. It was on Windows, gimmie a sec to just put my linux out of suspend and try it real quick. (Still convinced it's 100% a issue on your end though)

Ok! For future reference, my linux release has v4.2.1.stable.official.b09f793f5 as the godot engine version

Apologies for doubting you, it seems you were correct.

Linux version is indeed broken. #99 seems to speak about this but the author decided to leave no words. I'll link this issue there

Apologies for doubting you, it seems you were correct.

Linux version is indeed broken. #99 seems to speak about this but the author decided to leave no words. I'll link this issue there

It's all good! Sorry for bothering you further, but I'll try to dig it up a bit: what's the godot engine version for your windows build?

No idea, sorry :p

Perhaps rename issue to "Syntax highlighting broken on linux"?
(unless that's not the topic but that's what i'm reading at least)

Can confirm it only works improperly on Linux.

I'm wondering why that is...

for entry in crth:
if CH.has_color_region(entry[0]): continue
CH.add_color_region(entry[0], entry[1], LuaSingleton.keywords[entry[2]], entry[3])

This is where the magic happens. To debug this I'd suggest logging the entry, running GriddyCode, and entering a JavaScript file. Then compare the printed results on Linux and Windows.

I was able to reproduce the bug on Windows with rendering driver opengl3 - maybe that's the issue?

The only Windows PC I have is not performant enough to run it from DirectX, maybe someone who's downloaded it from the Releases folder could triple-check for DX as well?

i have this issue on windows too, not just linux

Weird; i don't have it

Windows here
I don't have this issue in empty files
image

But do when in a proper js file
image

Windows here
I don't have this issue in empty files
image

But do when in a proper js file
image

i believe its because it doesn't think you're in js inside the first file, hence it doesn't apply the quotes magic

you can see the dash is colored differently from the other text in the quotes