Skip to content

fix: register text and ansi languages to prevent highlight loop - #6

Closed
dansusman wants to merge 1 commit into
mainfrom
susman/plaintext-hang
Closed

dansusman wants to merge 1 commit into
mainfrom
susman/plaintext-hang

Conversation

@dansusman

Copy link
Copy Markdown
Owner

Add 'text' and 'ansi' to AttachedLanguages registry to prevent infinite re-render cycles when highlighting files with unrecognized extensions. These languages are built-in fallbacks that pierre/diffs skips registering, causing areLanguagesAttached() to always return false and triggering unnecessary highlight operations.

I noticed hangs when reviewing diffs with plaintext file changes, this seems to resolve them.

Add 'text' and 'ansi' to AttachedLanguages registry to
prevent infinite re-render cycles when highlighting files
with unrecognized extensions. These languages are built-in
fallbacks that pierre/diffs skips registering, causing
areLanguagesAttached() to always return false and
triggering unnecessary highlight operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant