You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Unstaged changes view goes weird after staging a hunk #2550
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
When viewing unstaged changes for a file, sometimes when I click on "Stage Hunk", the view jumps down to a seemingly random place. When I scroll back up, the hunk that I just staged is still visible in the "Unstaged changes" view. If I go to the "Staged changes" view, the hunk that I just staged is shown. If I go back to "Unstaged changes" view, the hunk is no longer visible.
This only seems to happen in some files and not others...
Here is a video demonstrating the problem in safe mode, with factory default settings: https://youtu.be/-jeOiUgCPLg
Steps to Reproduce
Open "Unstaged changes" view
Click on "Stage hunk" for one of the unstaged hunks
Expected behavior:
After clikcing "Stage hunk", expect this hunk to disappear from "Unstaged changes" view, and that the next unstaged hunk moves up in the view.
After clicking "Stage hunk", the "Unstaged changes" view jumps down to a seemingly random unrelated hunk elsewhere. After scrolling back up to the hunk I had tried to stage, it is still visible in the "Unstaged changes" view, except the line numbers in the gutter no longer make sense (the hunk I just staged seems to now have the line numbers from the next unstaged hunk sitting in the gutter beside it). If I go to "Staged changes" view, I see that the hunk did in fact get staged. If I go back to "Unstaged changes" view, the hunk is no longer there.
I tried moving the base file to a different repositoy, commit, then apply all the same changes. When trying to stage those changes, I get a totally different flavor of bug. It seems like this bug may have something to do with the fact that the file that I am trying to stage diff hunks from is considered by atom to have a "large diff", and therefore the diff does not auto-load? See #799
After clicking "Stage hunk", the "Unstaged changes" view seems to bring back the "load diff" message. If I click "load diff", then the unstaged change view displays the correct unstaged changes, except with no diff highlighting. See https://youtu.be/-jeOiUgCPLg
changed the title [-]Unstaged changes view jumps bottom and doesn't update after staging a hunk[/-][+]Unstaged changes view goes weird after staging a hunk[/+]on Oct 26, 2020
Activity
[-]Unstaged changes view jumps bottom and doesn't update after staging a hunk[/-][+]Unstaged changes view goes weird after staging a hunk[/+]