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

detectindent: Limit subsyntax depth #1253

Merged

Conversation

Guldoman
Copy link
Member

Fixes #1247.

This limits to 5 the subsyntaxes depth detectindent will consider. This ought to be enough for anybody.
This is an alternative to #1250.

As said in #1250, I still don't think this is the correct way to fix the issue because it's still using subsyntax info in places outside the actual subsyntax block, which can create "false negatives" and skip checking lines that would actually determine the indent.

@jgmdev
Copy link
Member

jgmdev commented Dec 21, 2022

Once the native tokenizer is mature and merged into master we can re-introduce usage of the tokenizer for correctness since performance will no longer be an issue. But right now even with the performance fixes to tokenizer (like the consecutive spaces handling) Multiple plugins using it like rainbow parens, etc... will cause slowdowns.

And sorry I closed by mistake while typing from phone xD

@jgmdev jgmdev closed this Dec 21, 2022
@jgmdev jgmdev reopened this Dec 21, 2022
@jgmdev jgmdev merged commit 97bfe50 into lite-xl:master Dec 21, 2022
takase1121 pushed a commit to takase1121/lite-xl that referenced this pull request Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recursive subsyntax causes detectindent to hang
2 participants