-
Notifications
You must be signed in to change notification settings - Fork 334
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
Error: "index out of bounds: the len is 20 but the index is 20" #694
Comments
|
I can reproduce this with just the two If this has the same root cause, then this should narrow it down considerably. The trace does look a bit different.
|
Fixes Wilfred#688, fixes Wilfred#694, fixes Wilfred#682, and fixes Wilfred#681.
Fixes Wilfred#688, fixes Wilfred#694 and fixes Wilfred#682.
Fixes Wilfred#688, fixes Wilfred#694 and fixes Wilfred#681.
Fixes Wilfred#688, fixes Wilfred#694, fixes Wilfred#682 and fixes Wilfred#681. This works around the fact that `str::lines` does not include last newline character. This means that `"a\n".lines().count() == "a".lines().count()`, which breaks the 1:1 assumption made by display implementations.
Fixes Wilfred#688, fixes Wilfred#694, fixes Wilfred#682 and fixes Wilfred#681. This works around the fact that `str::lines` does not include last newline character. This means that `"a\n".lines().count() == "a".lines().count()`, which breaks the 1:1 assumption made by display implementations.
I have encountered the same issue and made this small reproducer: file ---
asdf: |-
foo:
foo:
bar: b
foo: a
foo:
file ---
asdf: |-
foo:
foo:
foo: a
foo:
command used to provoke the error: |
Merging into #688, thanks for the report! |
Description
After several useful diffs, the output stops with this error. It's unclear to me whether this is a trailing error, or whether there would have been more output without this error. I worry the latter.
Test case
Version
macOS 13. Using Homebrew to install difft. Details at https://formulae.brew.sh/formula/difftastic and https://github.com/Homebrew/homebrew-core/blob/b5b224ebe92c94a69806ca1c3b90b9fbe7739e11/Formula/d/difftastic.rb.
The text was updated successfully, but these errors were encountered: