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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Hangs on patch #1451

Open
mustafa0x opened this issue Jun 20, 2023 · 3 comments
Open

馃悰 Hangs on patch #1451

mustafa0x opened this issue Jun 20, 2023 · 3 comments

Comments

@mustafa0x
Copy link

mustafa0x commented Jun 20, 2023

delta (v0.16.5) hangs on the following input (save as bad-diff.diff and run delta < bad-diff.diff)

commit deadbeef

diff --git a/bar.svelte b/bar.svelte
--- a/bar.svelte
+++ b/bar.svelte
@@ -90,7 +90,9 @@ async function add(a, b) {
+let foo
 export async function go_to_bar(bar_no) {
+    foo = bar_no
     /*

Happened when running git log -p | delta, and I narrowed it down to this.

@dandavison
Copy link
Owner

Hi @mustafa0x, thanks! That's exciting. It appears to be the syntax highlighting library (syntect), or something about the way that delta's calling syntect.

A print statement before this line https://github.com/dandavison/delta/blob/master/src/paint.rs#L669

shows that delta is submitting the line below to syntect highlight_line and that this call hangs.

     /*

@dandavison
Copy link
Owner

Looks like trishume/syntect#460.

@dandavison
Copy link
Owner

dandavison commented Jun 21, 2023

We may want to follow what was done here: rust-lang/docs.rs#1944

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

No branches or pull requests

2 participants