jesseduffield / jesseduffield/lazygit
Cursor jumping when staging deleted part of moved file
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
**Describe the bug**
When I move a file, first stage the `A` version at the new location and then stage the `D` version at the old location, the cursor jumps up to the new location. This can be inconvenient and unexpected when moving many files to a subdirectory. Furthermore this behavior only happens when the `A` file is staged first and the `D` second, the other way around works fine.
**To Reproduce**
Steps to reproduce the behavior:
- add a few file to a repo and commit them
- move the files to a subfolder, open lazygit and stage the `A` versions of the files in the subfolder
- stage a `D` version in the old location
- observe that the file at the new `A` location (now `R`) gets selected
**Expected behavior**
The cursor should stay were the deleted file was staged so the user does not have to scroll around to continue where they left off.
**Screenshots**

**Version info:**
```
commit=d1a8b05401ccda1e52215203139a252eb3be3b79, build date=2022-11-14T09:22:31Z, build source=binaryRelease, version=0.36.0, os=linux, arch=amd64, git version=2.34.1
```
Contributor guide
Assessment
This issue has not been assessed yet.