Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting can get weird for big projects #1

Closed
Auroriax opened this issue Feb 16, 2021 · 4 comments
Closed

Syntax highlighting can get weird for big projects #1

Auroriax opened this issue Feb 16, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@Auroriax
Copy link
Owner

It seems that if you scroll too quickly the syntax highlighting can get weird & can cause ctrl+clicking a level to crash in some cases:

afbeelding

Could it break because I changed the syntax highlighing code?

@Auroriax
Copy link
Owner Author

Not 100% sure, but my hunch is that it might have something to do with how the > character is escaped in the puzzlescript source code that can confuse the parser. I should probably replace the > with another glyph that's escape-safe, like a special instruction such as copy:.

@Auroriax
Copy link
Owner Author

So it seems that PS syntax highlighting is prone to break on projects that have a very large source code (e.g. Gridblocked), it seems most people with gargantuan PS source code (e.g. Selene's Garden) don't use the editor to edit code because it's prone to breaking. So it could be a CodeMirror issue. Might be worth it to bring this up with increpare?

As for the editor crashing, seems it could've been a stuck for loop or a memory overflow... I don't have enough info to go on to fix it.

@Auroriax Auroriax added the bug Something isn't working label Nov 26, 2021
@Auroriax Auroriax changed the title Chrome - Syntax highlighting can be botched in some cases Syntax highlighting can get weird for big projects Nov 29, 2021
@Auroriax
Copy link
Owner Author

Auroriax commented Jan 6, 2022

This has become a messy issue. To summarize:

  1. One issue is that the editor crashes sometimes. However, I know very little about the conditions of the crash, so I can't reproduce it. I do think they were looking at the Gridblocked code which is mouse-supported, for which I've just resolved a crash, so I think this issue is now resolved (since I don't have a touchscreen-enabled laptop to test it).
  2. The syntax highlighting issue seems to be a vanilla PS bug. However, source code for PS+ projects is usually larger that for vanilla projects, which increases the chance of running into this bug. I still want to make a repro case and log it by increpare.

@Auroriax
Copy link
Owner Author

Auroriax commented Dec 5, 2022

Reported to increpare as increpare#947. Closing here.

@Auroriax Auroriax closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant