Skip to content

🐛 panic associated with side-by-side wrapping operations  #802

@dandavison

Description

@dandavison

delta 0.10 has introduced a regression as reported by @alerque in #794 (comment) : a panic can be triggered by a colorMoved line under side-by-side cc @th1000s .

Using diff-codes.txt

delta --no-gitconfig --side-by-side < diff-codes.txt

Triggering the bug depends on terminal size: in the following output t1 is the syntax_style_sections string concatenation and t2 is the diff_style_sections string concatenation.

[src/wrapping.rs:292] t1 = "As I swore in my wrath, 'They shall not enter my rest.'\"\n"
[src/wrapping.rs:293] t2 = "As I swore in my wrath, 'They shall not enter my rest.'\""
thread 'main' panicked at 'String mismatch encountered while superimposing style sections: '↵' vs '↴'', src/paint.rs:869:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions