robindouglasjohnson / gruescript

Point-and-click text adventure maker
MIT License
57 stars 14 forks source link

Syntax Highlighting #11

Open iifste2020 opened 2 years ago

iifste2020 commented 2 years ago

On lower end machines the syntax highlighting really slows down the online editor on large projects.

robindouglasjohnson commented 2 years ago

Thanks. For now, I've added an option to disable syntax highlighting, which is in the new "Options" menu with dark/light theme.

iifste2020 commented 2 years ago

Thanks. However line numbers no longer sync when highlighting is off.

robindouglasjohnson commented 2 years ago

Ah, that's interesting. The line numbers should work now -- it's a less efficient fix, but it's not doing all the regex matching and replacing so hopefully it will be ok - let me know if you can! Otherwise I could introduce an ultra-efficient mode using just a plain textarea, with no syntax highlighting OR line numbers.

iifste2020 commented 2 years ago

Thanks. Unfortunately this less efficient fix is still very slow on low end machines. I'm using an old netbook with 1gb ram and (for example) editing The Party Line is difficult. Obviously using old equipment will cause issues. Your alternative may be helpful here. Thanks again.

robindouglasjohnson commented 2 years ago

OK. For now I've disabled line numbers too when syntax highlighting is off, giving you just a plain textarea, which should be usable if basic. Looks like I need to incorporate CodeMirror or something similar to sort this.

iifste2020 commented 2 years ago

Thanks, this works great now.