mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-12 04:23:03 +02:00
same for renames
This commit is contained in:
parent
b5a5169372
commit
1629a7d280
@ -534,6 +534,14 @@ func (gui *Gui) refreshStateFiles() error {
|
|||||||
prevSelectedLineIdx := gui.State.Panels.Files.SelectedLineIdx
|
prevSelectedLineIdx := gui.State.Panels.Files.SelectedLineIdx
|
||||||
|
|
||||||
files := gui.GitCommand.GetStatusFiles(commands.GetStatusFileOptions{})
|
files := gui.GitCommand.GetStatusFiles(commands.GetStatusFileOptions{})
|
||||||
|
|
||||||
|
// for when you stage the old file of a rename and the new file is in a collapsed dir
|
||||||
|
for _, file := range files {
|
||||||
|
if selectedNode != nil && selectedNode.Path != "" && file.PreviousName == selectedNode.Path {
|
||||||
|
gui.State.FileChangeManager.ExpandToPath(file.Name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gui.State.FileChangeManager.SetFiles(files)
|
gui.State.FileChangeManager.SetFiles(files)
|
||||||
|
|
||||||
if err := gui.fileWatcher.addFilesToFileWatcher(files); err != nil {
|
if err := gui.fileWatcher.addFilesToFileWatcher(files); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user