Skip to content

fix(render): handle nil changes when cycling tabs#309

Open
iamavolk wants to merge 1 commit intoesmuellert:mainfrom
iamavolk:fix_untracked_render
Open

fix(render): handle nil changes when cycling tabs#309
iamavolk wants to merge 1 commit intoesmuellert:mainfrom
iamavolk:fix_untracked_render

Conversation

@iamavolk
Copy link

@iamavolk iamavolk commented Mar 5, 2026

Setup:

  1. One or more untracked files in the repo.
  2. A few tabs are open besides the CodeDiff exporer with the selected untracked file in diff.
  3. Start moving through tabs with gt (gT) to cycle around and get back to the same tab.
  4. Observe an error: nil value passed down.

What's changed:

This fix adds a defensive nil check before invoking the iterator.

Potential implications:

Maybe not the right place to handle the error since on the first cycling through tabs the untracked file has all of its entirety in the lines_diff.changes table, and also renders momentarily.

when cycling through tabs more than once,
the changes appear to be nil starting
with the second cycle. As such, nil is
passed down to the iterator factory.

Add a defensive nil check beforehand
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