mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
rename patch manager to patch builder
This commit is contained in:
@ -106,7 +106,7 @@ func (self *PatchBuildingController) toggleSelection() error {
|
||||
self.context().GetMutex().Lock()
|
||||
defer self.context().GetMutex().Unlock()
|
||||
|
||||
toggleFunc := self.git.Patch.PatchManager.AddFileLineRange
|
||||
toggleFunc := self.git.Patch.PatchBuilder.AddFileLineRange
|
||||
filename := self.contexts.CommitFiles.GetSelectedPath()
|
||||
if filename == "" {
|
||||
return nil
|
||||
@ -114,13 +114,13 @@ func (self *PatchBuildingController) toggleSelection() error {
|
||||
|
||||
state := self.context().GetState()
|
||||
|
||||
includedLineIndices, err := self.git.Patch.PatchManager.GetFileIncLineIndices(filename)
|
||||
includedLineIndices, err := self.git.Patch.PatchBuilder.GetFileIncLineIndices(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
currentLineIsStaged := lo.Contains(includedLineIndices, state.GetSelectedLineIdx())
|
||||
if currentLineIsStaged {
|
||||
toggleFunc = self.git.Patch.PatchManager.RemoveFileLineRange
|
||||
toggleFunc = self.git.Patch.PatchBuilder.RemoveFileLineRange
|
||||
}
|
||||
|
||||
// add range of lines to those set for the file
|
||||
|
Reference in New Issue
Block a user