face-hh / griddycode

A code editor made with Godot. Code has never been more lit!
Apache License 2.0
1.75k stars 108 forks source link

Quotes unproperly highlit in Linux #101

Open immjs opened 6 months ago

immjs commented 6 months ago

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):

ItsTato commented 6 months ago

Cannot replicate in 1.2.0 image

With the example code you left: image

immjs commented 6 months ago

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

ItsTato commented 6 months ago

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)

immjs commented 6 months ago

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

ItsTato commented 6 months ago

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

immjs commented 6 months ago

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?

ItsTato commented 6 months ago

No idea, sorry :p

Symmettry commented 6 months ago

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

face-hh commented 6 months ago

Can confirm it only works improperly on Linux.

I'm wondering why that is...

https://github.com/face-hh/griddycode/blob/6332a66671952a79cea4ea824b783f231fd9f67c/Scripts/settings.gd#L66-L69

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.

immjs commented 6 months ago

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?

tovade commented 5 months ago

i have this issue on windows too, not just linux

Symmettry commented 5 months ago

Weird; i don't have it

KisenaMiyuki commented 4 months ago

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

But do when in a proper js file image

immjs commented 4 months ago

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